mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-02-25 07:28:41 +01:00
* Fix bug #37830, always append dot even if signature empty
git-svn-id: trunk@46984 -
(cherry picked from commit b9158ed311)
This commit is contained in:
parent
a03e1ab579
commit
77283dd4ab
@ -165,8 +165,10 @@ function TJWT.GetAsString: TJSONStringType;
|
||||
begin
|
||||
Result:=Base64ToBase64URL(EncodeStringBase64(JOSE.AsString));
|
||||
Result:=Result+'.'+Base64ToBase64URL(EncodeStringBase64(Claims.AsString));
|
||||
If (Signature<>'') then
|
||||
Result:=Result+'.'+Signature;
|
||||
// Dot must always be present, even if signature is empty.
|
||||
// https://tools.ietf.org/html/rfc7519#section-6.1
|
||||
// (See also Bug ID 37830)
|
||||
Result:=Result+'.'+Signature;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user