-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ajax password reset #5332
Ajax password reset #5332
Changes from all commits
3aefd64
6481a5a
2d50f20
b0e8f3d
d2f3101
8e0e258
3c914df
3a7e0f7
a9828cc
062471f
b5436fd
afdcb4f
f51db6c
0e86783
c0688b3
68ee2c4
a8cb050
4bf3667
6f82c0b
168e5ed
5342a18
a8d9504
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ export class UserController extends AdaptableController { | |
) | ||
.then(results => { | ||
if (results.length != 1) { | ||
throw undefined; | ||
throw 'Failed to reset password: username / email / token is invalid'; | ||
} | ||
|
||
if ( | ||
|
@@ -246,7 +246,7 @@ export class UserController extends AdaptableController { | |
return this.checkResetTokenValidity(username, token) | ||
.then(user => updateUserPassword(user.objectId, password, this.config)) | ||
.catch(error => { | ||
if (error.message) { | ||
if (error && error.message) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why would we be in a catch and have no error? that seems bad. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had the same feeling. I could back track and see what the underlying cause is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, we shouldn't throw without a message. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just committed a fix |
||
// in case of Parse.Error, fail with the error message only | ||
return Promise.reject(error.message); | ||
} else { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did a little git blame sleuthing on this one.
git show 7e868b2
note the comment that used to be there:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't even notice that.