Master - Feb/02 - Fail "TNetEncoding.URL.URLDecode" in Seattle  

  RSS

amarildolacerda
New Member
Joined: 2 years  ago
Posts: 3
21 February 2018 14:02  

source: MVCFramework.middleware.JWT.pas  (about line 190);

 

function "TNetEncoding.URL.URLDecode" does not exist in Seattle.

<pre>
    // retrieve the token from the "authentication bearer" header

    AuthToken := '';

    if AuthHeader.StartsWith('bearer', True) then

    begin

      AuthToken := AuthHeader.Remove(0, 'bearer'.Length).Trim;

      AuthToken := Trim(TNetEncoding.URL.URLDecode(AuthToken));

    end;

</pre>

 

 

we change to:

<pre>

    // retrieve the token from the "authentication bearer" header

    AuthToken := '';

    if AuthHeader.StartsWith('bearer', True) then

    begin

      AuthToken := AuthHeader.Remove(0, 'bearer'.Length).Trim;

      {$ifdef VER300}

      AuthToken := Trim(TNetEncoding.URL.Decode(AuthToken));

      {$else}

      AuthToken := Trim(TNetEncoding.URL.URLDecode(AuthToken));

      {$endif}

    end;

</pre>

 


ReplyQuoteLikeReport
  
Working

Please Login or Register