Skip to content

Commit ac36513

Browse files
committed
Fix custom IAT expiry overflowing the GraphQL Int on far-future dates
ref DEV-3801
1 parent 51242e4 commit ac36513

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

portal/src/components/dynamic-clients/CreateInitialAccessTokenDialog.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ export function CreateInitialAccessTokenDialog({
8383
if (seconds <= 0) {
8484
return null;
8585
}
86+
// expiresIn is a GraphQL Int (32-bit signed); a far-future date (e.g. a
87+
// typo'd year) would fail Int coercion at the API. Treat it as invalid.
88+
if (seconds > 2147483647) {
89+
return null;
90+
}
8691
return seconds;
8792
},
8893
[]

0 commit comments

Comments
 (0)