Allow spaces and numbers in usernames, at least while we're doing forum-based authentication
This commit is contained in:
parent
6e7bfe413e
commit
e7cea2ebc8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user