-
Notifications
You must be signed in to change notification settings - Fork 305
Closed
Labels
Description
This is a follow on issue#1771
We need to have allways same response when user exists/notExists
- PR fix issue 1770: #1773 resolves the case when email service is setup
- when email service is not setup the server should return
Email service is not set upalso when username do not exist - when email service is setup, and email do not exist the server returns
Account recovery email has not been provided
these are/should be rare cases when email is setup and only on really experimental server.
When username do not exist I propose to return the actual no error
Adding (in username if (!exists)) a call to verifyEmailDependencies ()
node-solid-server/lib/models/account-manager.js
Lines 535 to 543 in 88d3a86
| verifyEmailDependencies (userAccount) { | |
| if (!this.emailService) { | |
| throw new Error('Email service is not set up') | |
| } | |
| if (!userAccount.email) { | |
| throw new Error('Account recovery email has not been provided') | |
| } | |
| } |
Also replacing throw error with success
node-solid-server/lib/models/account-manager.js
Lines 540 to 542 in 88d3a86
| if (!userAccount.email) { | |
| throw new Error('Account recovery email has not been provided') | |
| } |
with
if (userAccount && !userAccount.email) {
return resetLinkMessage ()
fix branch created fix/issue#1774