PR feedback
parent
9def0bb5c2
commit
5e55b6a643
|
@ -93,7 +93,7 @@ module.exports = React.createClass({
|
|||
const usingEmail = username.indexOf("@") > 0;
|
||||
if (error.httpStatus == 400 && usingEmail) {
|
||||
errorText = _t('This Home Server does not support login using email address.');
|
||||
} else if (error.httpStatus == 401 || error.httpStatus === 403) {
|
||||
} else if (error.httpStatus === 401 || error.httpStatus === 403) {
|
||||
errorText = _t('Incorrect username and/or password.');
|
||||
} else {
|
||||
// other errors, not specific to doing a password login
|
||||
|
@ -102,8 +102,11 @@ module.exports = React.createClass({
|
|||
|
||||
this.setState({
|
||||
errorText: errorText,
|
||||
// https://matrix.org/jira/browse/SYN-744
|
||||
loginIncorrect: error.httpStatus == 401 || error.httpStatus == 403
|
||||
// 401 would be the sensible status code for 'incorrect password'
|
||||
// but the login API gives a 403 https://matrix.org/jira/browse/SYN-744
|
||||
// mentions this (although the bug is for UI auth which is not this)
|
||||
// We treat both as an incorrect password
|
||||
loginIncorrect: error.httpStatus === 401 || error.httpStatus == 403,
|
||||
});
|
||||
}).finally(() => {
|
||||
this.setState({
|
||||
|
|
Loading…
Reference in New Issue