Convert UTF8 encoded passwords to ISO-8859-1 for |R = 6| encryption (issue 6010)

For passwords where the encoding already is correct, the conversion is a no-op.
Also, since `encodeURIComponent` might throw, we need to make sure that we handle that case too.

Fixes 6010.
This commit is contained in:
Jonas Jenwald 2015-05-13 17:25:42 +02:00
parent 90982332bf
commit 44240798be
6 changed files with 109 additions and 2 deletions

View file

@ -946,6 +946,10 @@ function stringToUTF8String(str) {
return decodeURIComponent(escape(str));
}
function utf8StringToString(str) {
return unescape(encodeURIComponent(str));
}
function isEmptyObj(obj) {
for (var key in obj) {
return false;