FSN#39763 Workaround voor dll-bugje in base64_decode

svn path=/Website/branches/v2016.3/; revision=33068
This commit is contained in:
Jos Groot Lipman
2017-03-07 14:34:50 +00:00
parent 1226e8720a
commit 125f38ff6a

View File

@@ -968,6 +968,12 @@ function jwt_decode(token)
try try
{ {
// base64 decode and parse JSON // base64 decode and parse JSON
// FSN#39763 SLNKDWF.DLL v4.16 heeft nog een bug in het decoderen van
// url-safe encoded teksten. Daarom hier voor-corrigeren
result.headerSeg = result.headerSeg.replace(/\-/g, "+").replace(/\_/g, "/");
result.payloadSeg = result.payloadSeg.replace(/\-/g, "+").replace(/\_/g, "/");
result.header = JSON.parse(oCrypto.base64_decode(result.headerSeg)); result.header = JSON.parse(oCrypto.base64_decode(result.headerSeg));
result.payload = JSON.parse(oCrypto.base64_decode(result.payloadSeg)); result.payload = JSON.parse(oCrypto.base64_decode(result.payloadSeg));
} }