4
0
Эх сурвалжийг харах

Anchor `=` removal in webauthn_handler.js

Since we're base64-encoding, `=` can only happen at the end, so no need to
traverse the whole payload.
jvoisin 1 жил өмнө
parent
commit
71c7845c42

+ 1 - 1
internal/ui/static/js/webauthn_handler.js

@@ -42,7 +42,7 @@ class WebAuthnHandler {
         return btoa(String.fromCharCode.apply(null, new Uint8Array(value)))
             .replace(/\+/g, "-")
             .replace(/\//g, "_")
-            .replace(/=/g, "");
+            .replace(/=+$/g, "");
     }
 
     async post(urlKey, username, data) {