# Bug OP-15197 - Password reset token not invalidated when user changes email

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-15197

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 14.2.0 |
| Observed in versions |  |
| Sprint | 14.2.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Oliver Günther |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Before filing a report

_Before you file a report, please ensure you are running the latest version of OpenProject and_&nbsp;  
_have searched for similar bug reports._

### Steps to reproduce

_Please write down the steps to reproduce. Try to write down all necessary preconditions (what permissions do you have, are other users involved?). Example:_

1.  Send password reset mail to your current mail [foo@example.com](mailto:foo@example.com)
    
2.  Change your mail to [bar@example.com](mailto:bar@example.com)
    
3.  Open the password reset link
    

### What is the buggy behavior?

_Please describe the bug in as much detail as possible. Example:_

*   The token is still valid
    

### What is the expected behavior?

_Describe how the application should behave like. Example:_

1.  The token should be invalidated whenever
    
    1.  The user logged in anew
        
    2.  The user changed their password in an active session
        
    3.  The user changed their email address
        

### Credits

**Sohaib**  
https://helpdesk.openproject.org/web#id=15812&amp;cids=1&amp;menu\_id=232&amp;action=330&amp;model=helpdesk.ticket&amp;view\_type=form

**(Security Researcher)**
