mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
parent
0ff7b33a48
commit
faa17ca3de
1 changed files with 2 additions and 2 deletions
|
|
@ -37,10 +37,10 @@ try {
|
||||||
if (!smctoken) {
|
if (!smctoken) {
|
||||||
let data = new Uint8Array(16);
|
let data = new Uint8Array(16);
|
||||||
crypto.getRandomValues(data);
|
crypto.getRandomValues(data);
|
||||||
smctoken = btoa(String.fromCharCode(...data));
|
smctoken = encodeURIComponent(btoa(String.fromCharCode(...data)));
|
||||||
}
|
}
|
||||||
localStorage.setItem('smctoken', smctoken);
|
localStorage.setItem('smctoken', smctoken);
|
||||||
doc.cookie = 'smctoken='+encodeURIComponent(smctoken)+"; path=/; samesite=strict";
|
doc.cookie = 'smctoken='+smctoken+"; path=/; samesite=strict";
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue