From 004948e82bb3fa0211141074759d1433d591e5e8 Mon Sep 17 00:00:00 2001 From: Jesse Tane Date: Wed, 31 Dec 2014 00:02:15 -0500 Subject: [PATCH] Revert "allow decoding url-safe base64 space and slash" This reverts commit 767070ece98af730d110e4905aa454db6a4a9a4c. --- index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/index.js b/index.js index a9a9b5d..1aa5acc 100644 --- a/index.js +++ b/index.js @@ -1146,8 +1146,6 @@ var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // replace url-safe space and slash - str = str.replace(/-/g, '+').replace(/_/g, '/') // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not -- 2.34.1