[GH-ISSUE #512] Password Reset flow not working #185

Closed
opened 2026-02-27 08:15:45 +03:00 by kerem · 1 comment
Owner

Originally created by @crobibero on GitHub (Mar 29, 2023).
Original GitHub issue: https://github.com/lldap/lldap/issues/512

Version: 0.4.2

Steps to reproduce:

  1. Generate reset link to email
  2. Click on link
  3. ???
  4. Get redirected to login page or user list page if logged in

This has been tested and verified on multiple browsers / devices

From chat: "password reset works correctly when i click back in the browser and input a new password. This has been tried with multiple different browsers "

Server logs:

2023-03-28T23:37:55.881306255+00:00  INFO     HTTP request [ 249µs | 100.00% ]
2023-03-28T23:37:55.881316273+00:00  INFO     ┝━ i [info]:  | uri: /reset-password/step2/L29hTw1PHKNRI22i7Q4GbkozLmiIxGG2ZsrgD4q0DRWdJfgTRPuQqs8ASIvnOgIAzLPW2B7Avb0zcT7hlZwWXWH8SWrZfhsBD9aH
2023-03-28T23:37:55.881421569+00:00  INFO     ┕━ i [info]:  | status_code: 200
2023-03-28T23:37:56.131233313+00:00  INFO     HTTP request [ 81.1µs | 81.89% / 100.00% ]
2023-03-28T23:37:56.131245133+00:00  INFO     ┝━ i [info]:  | uri: /auth/refresh
2023-03-28T23:37:56.131280672+00:00  DEBUG    ┝━ get_refresh [ 14.7µs | 18.11% ]
2023-03-28T23:37:56.131321120+00:00  INFO     ┕━ i [info]:  | status_code: 401
2023-03-28T23:37:56.131863560+00:00  INFO     HTTP request [ 436µs | 8.55% / 100.00% ]
2023-03-28T23:37:56.131867089+00:00  INFO     ┝━ i [info]:  | uri: /auth/reset/step1/lldap_unlikely_very_long_user_name
2023-03-28T23:37:56.131888347+00:00  DEBUG    ┝━ get_password_reset_step1 [ 399µs | 4.35% / 91.45% ]
2023-03-28T23:37:56.131895382+00:00  DEBUG    │  ┕━ list_users [ 380µs | 87.10% ]
2023-03-28T23:37:56.131932045+00:00  DEBUG    │     ┝━ 🐛 [debug]:  | filters: Some(Or([UserId(UserId("lldap_unlikely_very_long_user_name")), Equality(Email, "lldap_unlikely_very_long_user_name")]))
2023-03-28T23:37:56.132434158+00:00  DEBUG    │     ┕━ 🐛 [debug]:  | return: []
2023-03-28T23:37:56.132450621+00:00  INFO     ┕━ i [info]:  | status_code: 200
Originally created by @crobibero on GitHub (Mar 29, 2023). Original GitHub issue: https://github.com/lldap/lldap/issues/512 Version: 0.4.2 Steps to reproduce: 1. Generate reset link to email 2. Click on link 3. ??? 4. Get redirected to login page or user list page if logged in This has been tested and verified on multiple browsers / devices From chat: "password reset works correctly when i click back in the browser and input a new password. This has been tried with multiple different browsers " Server logs: ``` 2023-03-28T23:37:55.881306255+00:00 INFO HTTP request [ 249µs | 100.00% ] 2023-03-28T23:37:55.881316273+00:00 INFO ┝━ i [info]: | uri: /reset-password/step2/L29hTw1PHKNRI22i7Q4GbkozLmiIxGG2ZsrgD4q0DRWdJfgTRPuQqs8ASIvnOgIAzLPW2B7Avb0zcT7hlZwWXWH8SWrZfhsBD9aH 2023-03-28T23:37:55.881421569+00:00 INFO ┕━ i [info]: | status_code: 200 2023-03-28T23:37:56.131233313+00:00 INFO HTTP request [ 81.1µs | 81.89% / 100.00% ] 2023-03-28T23:37:56.131245133+00:00 INFO ┝━ i [info]: | uri: /auth/refresh 2023-03-28T23:37:56.131280672+00:00 DEBUG ┝━ get_refresh [ 14.7µs | 18.11% ] 2023-03-28T23:37:56.131321120+00:00 INFO ┕━ i [info]: | status_code: 401 2023-03-28T23:37:56.131863560+00:00 INFO HTTP request [ 436µs | 8.55% / 100.00% ] 2023-03-28T23:37:56.131867089+00:00 INFO ┝━ i [info]: | uri: /auth/reset/step1/lldap_unlikely_very_long_user_name 2023-03-28T23:37:56.131888347+00:00 DEBUG ┝━ get_password_reset_step1 [ 399µs | 4.35% / 91.45% ] 2023-03-28T23:37:56.131895382+00:00 DEBUG │ ┕━ list_users [ 380µs | 87.10% ] 2023-03-28T23:37:56.131932045+00:00 DEBUG │ ┝━ 🐛 [debug]: | filters: Some(Or([UserId(UserId("lldap_unlikely_very_long_user_name")), Equality(Email, "lldap_unlikely_very_long_user_name")])) 2023-03-28T23:37:56.132434158+00:00 DEBUG │ ┕━ 🐛 [debug]: | return: [] 2023-03-28T23:37:56.132450621+00:00 INFO ┕━ i [info]: | status_code: 200 ```
kerem closed this issue 2026-02-27 08:15:45 +03:00
Author
Owner

@nitnelave commented on GitHub (Mar 29, 2023):

Having a look at the code, I see the issue: https://github.com/nitnelave/lldap/blob/main/app/src/components/app.rs#L180
The if should be inside the case and have an else return None.

Well, that should be an easy fix!

<!-- gh-comment-id:1488557917 --> @nitnelave commented on GitHub (Mar 29, 2023): Having a look at the code, I see the issue: https://github.com/nitnelave/lldap/blob/main/app/src/components/app.rs#L180 The if should be inside the case and have an else return None. Well, that should be an easy fix!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#185
No description provided.