mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-03 07:10:26 +00:00
Decode base64url
This commit is contained in:
@@ -32,7 +32,10 @@ export const useE2eeConfig = (
|
||||
// as such. Otherwise, we assume it's an old-style password and use it as a string.
|
||||
try {
|
||||
const itFunc = function* () {
|
||||
const decoded = atob(passwordString);
|
||||
const decoded = atob(
|
||||
// built-in atob doesn't support base64url, so convert
|
||||
passwordString.replace("-", "+").replace("_", "/")
|
||||
);
|
||||
for (let i = 0; i < decoded.length; ++i) {
|
||||
yield decoded.charCodeAt(i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user