www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 683af216918170c4061bda78dbdd389bfea09900
parent 5f1e582b05899f1393eae73d68b26544c778f079
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed,  4 Dec 2013 02:17:11 -0500

Fix file sync errors with passwords containing % + two hex digits

Usernames and passwords going into nsIURI have to be percent-encoded.

Diffstat:
Mchrome/content/zotero/xpcom/storage/webdav.js | 4++--
Mchrome/content/zotero/xpcom/storage/zfs.js | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/storage/webdav.js b/chrome/content/zotero/xpcom/storage/webdav.js @@ -815,8 +815,8 @@ Zotero.Sync.Storage.WebDAV = (function () { var ios = Components.classes["@mozilla.org/network/io-service;1"]. getService(Components.interfaces.nsIIOService); var uri = ios.newURI(url, null, null); - uri.username = username; - uri.password = password; + uri.username = encodeURIComponent(username); + uri.password = encodeURIComponent(password); if (!uri.spec.match(/\/$/)) { uri.spec += "/"; } diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js @@ -684,8 +684,8 @@ Zotero.Sync.Storage.ZFS = (function () { var ios = Components.classes["@mozilla.org/network/io-service;1"]. getService(Components.interfaces.nsIIOService); var uri = ios.newURI(url, null, null); - uri.username = username; - uri.password = password; + uri.username = encodeURIComponent(username); + uri.password = encodeURIComponent(password); _rootURI = uri; uri = uri.clone();