Skip to content

Commit

Permalink
Merge pull request #709 from Iterable/MOB-6832-AuthDecode-crash-issue…
Browse files Browse the repository at this point in the history
…-fix

[MOB-6832] - AuthDecode crash fix
  • Loading branch information
Ayyanchira authored Mar 15, 2024
2 parents ed4b68d + e4055d2 commit 58dcf29
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ public void run() {
private static long decodedExpiration(String encodedJWT) throws Exception {
long exp = 0;
String[] split = encodedJWT.split("\\.");
//Check if jwt is valid
if (split.length != 3) {
throw new IllegalArgumentException("Invalid JWT");
}
String body = getJson(split[1]);
JSONObject jObj = new JSONObject(body);
exp = jObj.getLong(expirationString);
Expand Down

0 comments on commit 58dcf29

Please sign in to comment.