- bugfix for special chars in usernames, fixes #144
This commit is contained in:
parent
ebb203ea09
commit
2db1389553
2 changed files with 12 additions and 5 deletions
|
|
@ -313,7 +313,7 @@ function login(callback) {
|
|||
|
||||
var params = {
|
||||
'op': 'login',
|
||||
'user': encodeURIComponent(state['username']),
|
||||
'user': escape(state['username']),
|
||||
'password': state['password']
|
||||
}
|
||||
networkCall(params, function(http) { process_login(callback, http) })
|
||||
|
|
|
|||
|
|
@ -214,9 +214,17 @@ Dialog {
|
|||
// login failed....don't autlogin
|
||||
settings.autologin = false
|
||||
|
||||
// translate the error message
|
||||
if (errorMessage == 'API_DISABLED' || errorMessage == 'Error: API_DISABLED') {
|
||||
errorMessage = qsTr('The API is disabled. You have to enable it in the webinterface.')
|
||||
}
|
||||
else if (errorMessage == 'LOGIN_ERROR' || errorMessage == 'Error: LOGIN_ERROR') {
|
||||
errorMessage = qsTr('The supplied login credentials did not work.')
|
||||
}
|
||||
|
||||
// Let the user know
|
||||
//loginErrorDialog.text = errorMessage;
|
||||
//loginErrorDialog.open();
|
||||
notification.show(errorMessage)
|
||||
|
||||
dialog.reject()
|
||||
return;
|
||||
}
|
||||
|
|
@ -229,8 +237,7 @@ Dialog {
|
|||
function configDone(successful, errorMessage) {
|
||||
if(!successful) {
|
||||
// Let the user know
|
||||
//loginErrorDialog.text = errorMessage;
|
||||
//loginErrorDialog.open();
|
||||
notification.show(errorMessage)
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue