diff --git a/app/scripts/storage/impl/storage-webdav.js b/app/scripts/storage/impl/storage-webdav.js index 16779459..fb8c8a9a 100644 --- a/app/scripts/storage/impl/storage-webdav.js +++ b/app/scripts/storage/impl/storage-webdav.js @@ -280,7 +280,8 @@ class StorageWebDav extends StorageBase { let result = ''; for (let i = 0; i < str.length; i++) { const strCharCode = str.charCodeAt(i); - const anotherCharCode = another.charCodeAt(i % another.length); + const anotherIx = i % another.length; + const anotherCharCode = another.charCodeAt(anotherIx); const resultCharCode = strCharCode ^ anotherCharCode; result += String.fromCharCode(resultCharCode); }