www

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

commit e7cea2ebc8cf65ddf5414a2630d913fdbd1b75fc
parent 6e7bfe413e832f33194018fc3aab712d7c70ae41
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon,  7 Jul 2008 15:49:12 +0000

Allow spaces and numbers in usernames, at least while we're doing forum-based authentication



Diffstat:
Mchrome/content/zotero/xpcom/sync.js | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js @@ -513,10 +513,11 @@ Zotero.Sync.Server = new function () { if (!username) { _error("Username not set in Zotero.Sync.Server.login()"); } - else if (!username.match(/^\w+$/)) { + else if (!username.match(/^[\w\d ]+$/)) { _error("Invalid username '" + username + "' in Zotero.Sync.Server.login()"); } + username = encodeURIComponent(Zotero.Sync.Server.username); var password = encodeURIComponent(Zotero.Sync.Server.password); var body = _apiVersionComponent + "&username=" + username