We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45e3765 commit 6fc8c26Copy full SHA for 6fc8c26
JWT.php
@@ -127,8 +127,11 @@ public static function jsonEncode($input)
127
*/
128
public static function urlsafeB64Decode($input)
129
{
130
- $padlen = 4 - strlen($input) % 4;
131
- $input .= str_repeat('=', $padlen);
+ $remainder = strlen($input) % 4;
+ if ($remainder) {
132
+ $padlen = 4 - $remainder;
133
+ $input .= str_repeat('=', $padlen);
134
+ }
135
return base64_decode(strtr($input, '-_', '+/'));
136
}
137
0 commit comments