fix: Fix regex replacement for underscore and minus in parseToken. Closes #KEYCLOAK-14917

This commit is contained in:
Dan Manastireanu 2020-07-28 14:19:31 +03:00 committed by Pedro Igor
parent c7867c4c0d
commit 1441e5d6f8

View file

@ -1053,8 +1053,8 @@
function decodeToken(str) {
str = str.split('.')[1];
str = str.replace('/-/g', '+');
str = str.replace('/_/g', '/');
str = str.replace(/-/g, '+');
str = str.replace(/_/g, '/');
switch (str.length % 4) {
case 0:
break;