Skip to content

Commit

Permalink
Merge pull request #59 from wlandgraf/master
Browse files Browse the repository at this point in the history
Fixed AV when calling DeserializeOnly without passing TJWTClaimsClass
  • Loading branch information
paolo-rossi authored Aug 29, 2022
2 parents ac4989b + b741b01 commit 9cea04e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/JOSE/JOSE.Core.JWT.pas
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ constructor TJWT.Create(AClaimsClass: TJWTClaimsClass);
constructor TJWT.Create(AHeaderClass: TJWTHeaderClass; AClaimsClass: TJWTClaimsClass);
begin
FHeader := AHeaderClass.Create;
FClaims := AClaimsClass.Create;
if AClaimsClass = nil then
FClaims := TJWTClaims.Create
else
FClaims := AClaimsClass.Create;
end;

destructor TJWT.Destroy;
Expand Down

0 comments on commit 9cea04e

Please sign in to comment.