KEYCLOAK-13940 remove duplicated urlsafe decoding
This commit is contained in:
parent
44c49d69a7
commit
6332ed42c0
1 changed files with 8 additions and 12 deletions
|
@ -1037,8 +1037,7 @@
|
|||
|
||||
str = str.replace('/-/g', '+');
|
||||
str = str.replace('/_/g', '/');
|
||||
switch (str.length % 4)
|
||||
{
|
||||
switch (str.length % 4) {
|
||||
case 0:
|
||||
break;
|
||||
case 2:
|
||||
|
@ -1051,9 +1050,6 @@
|
|||
throw 'Invalid token';
|
||||
}
|
||||
|
||||
str = (str + '===').slice(0, str.length + (str.length % 4));
|
||||
str = str.replace(/-/g, '+').replace(/_/g, '/');
|
||||
|
||||
str = decodeURIComponent(escape(atob(str)));
|
||||
|
||||
str = JSON.parse(str);
|
||||
|
|
Loading…
Reference in a new issue