File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
main/java/org/apache/iceberg/rest/auth
test/java/org/apache/iceberg/rest/auth Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -441,7 +441,7 @@ static Long expiresAtMillis(String token) {
441
441
JsonNode node ;
442
442
try {
443
443
node = JsonUtil .mapper ().readTree (Base64 .getUrlDecoder ().decode (parts .get (1 )));
444
- } catch (IOException e ) {
444
+ } catch (IOException | IllegalArgumentException e ) {
445
445
return null ;
446
446
}
447
447
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ public void testOAuthScopeTokenValidation() {
73
73
public void testExpiresAt () {
74
74
assertThat (OAuth2Util .expiresAtMillis (null )).isNull ();
75
75
assertThat (OAuth2Util .expiresAtMillis ("not a token" )).isNull ();
76
+ assertThat (OAuth2Util .expiresAtMillis ("a.b.c token looks like jwt but not jwt and too short per section" )).isNull ();
76
77
77
78
// expires at epoch second = 1
78
79
String token =
You can’t perform that action at this time.
0 commit comments