Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

PASSWORD_RESET_URL_ALLOW_LIST with includes a # generates an invalid link in the email #13078

Closed
ludi81 opened this issue May 2, 2022 · 0 comments

Comments

@ludi81
Copy link

ludi81 commented May 2, 2022

Describe the Bug

Hi,

we use a # in our link for password rest. Therefore we set the PASSWORD_RESET_URL_ALLOW_LIST as follows:
PASSWORD_RESET_URL_ALLOW_LIST='https://URL/app/#/password/reset/'

The system generates the following url
https://URL/app?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNvZmlhQGx1ZGVzY2hlci5hdCIsInNjb3BlIjoicGFzc3dvcmQtcmVzZXQiLCJoYXNoIjoiN2Q2NmEyOGYiLCJpYXQiOjE2NTE0NzU1NDgsImV4cCI6MTY1MTU2MTk0OCwiaXNzIjoiZGlyZWN0dXMifQ.8LC5tbTGBcmSanifhrx_8nkkUzOEnRdYbYEC_wHRHEI#/password/reset

instead of
https://URL/app/#/password/reset/?token=....

The token will be inserted in before the # in the provided url.
The problem is in the requestPasswordReset function of the node_modules/directus/dist/services/users.js file

To Reproduce

see above

Errors Shown

none

What version of Directus are you using?

9.9.1

What version of Node.js are you using?

v16.13.2

What database are you using?

mysql

What browser are you using?

Safari and Chrome

How are you deploying Directus?

locally

@ludi81 ludi81 changed the title PASSWORD_RESET_URL_ALLOW_LIST with includes a # generates a invalid link in the email PASSWORD_RESET_URL_ALLOW_LIST with includes a # generates an invalid link in the email May 2, 2022
@directus directus locked and limited conversation to collaborators May 2, 2022
@rijkvanzanten rijkvanzanten converted this issue into discussion #13086 May 2, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant