File tree Expand file tree Collapse file tree 2 files changed +5
-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 +5
-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,10 @@ 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 (
77
+ OAuth2Util .expiresAtMillis (
78
+ "a.b.c token looks like jwt but not jwt and too short per section" ))
79
+ .isNull ();
76
80
77
81
// expires at epoch second = 1
78
82
String token =
You can’t perform that action at this time.
0 commit comments