Unable to change email address #548

Closed
opened 2026-02-04 21:30:13 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @yegle on GitHub (Jan 1, 2020).

Subject of the issue

It looks like I'm unable to change the email address from the settings page.

The request payload looks like this:

{"newEmail":"foo@example.com","masterPasswordHash":"some-hash"}

The response payload looks like this:

{"ErrorModel":{"Message":"Email cannot be changed to this address","Object":"error"},"Message":"","Object":"error","ValidationErrors":{"":["Email cannot be changed to this address"]},"error":"","error_description":""}

Server side log looks like this:

[2020-01-01 03:32:43][error][ERROR] Email cannot be changed to this address
[2020-01-01 03:32:43][response][INFO] POST /api/accounts/email-token (post_email_token) => 400 Bad Request

Your environment

  • Bitwarden_rs version: 1.13.0-95dd1cd7
  • Install method: docker
  • Clients used: web UI
  • Reverse proxy and version: probably not applicable
  • Version of mysql/postgresql: probably not applicable
  • Other relevant information:

Steps to reproduce

Change email address from the web under settings

Expected behaviour

The email address changed.

Actual behaviour

An error appear in the web:

An error has occurred.
Email cannot be changed to this address

Originally created by @yegle on GitHub (Jan 1, 2020). # Subject of the issue It looks like I'm unable to change the email address from the settings page. The request payload looks like this: ``` {"newEmail":"foo@example.com","masterPasswordHash":"some-hash"} ``` The response payload looks like this: ``` {"ErrorModel":{"Message":"Email cannot be changed to this address","Object":"error"},"Message":"","Object":"error","ValidationErrors":{"":["Email cannot be changed to this address"]},"error":"","error_description":""} ``` Server side log looks like this: ``` [2020-01-01 03:32:43][error][ERROR] Email cannot be changed to this address [2020-01-01 03:32:43][response][INFO] POST /api/accounts/email-token (post_email_token) => 400 Bad Request ``` ### Your environment * Bitwarden_rs version: 1.13.0-95dd1cd7 * Install method: docker * Clients used: web UI * Reverse proxy and version: probably not applicable * Version of mysql/postgresql: probably not applicable * Other relevant information: ### Steps to reproduce Change email address from the web under settings ### Expected behaviour The email address changed. ### Actual behaviour An error appear in the web: An error has occurred. Email cannot be changed to this address
Author
Owner

@WinkelB commented on GitHub (Jan 3, 2020):

Having the Same Problem.

@WinkelB commented on GitHub (Jan 3, 2020): Having the Same Problem.
Author
Owner

@aneisch commented on GitHub (Jan 3, 2020):

Seeing this as well. It looks like this is due to the following line:
https://github.com/dani-garcia/bitwarden_rs/blob/8d1b72b9512b90775e671b7ba08cd552a0aabd13/src/api/core/accounts.rs#L374

If I allow signups I'm then able to change an email address.

@aneisch commented on GitHub (Jan 3, 2020): Seeing this as well. It looks like this is due to the following line: **[https://github.com/dani-garcia/bitwarden_rs/blob/8d1b72b9512b90775e671b7ba08cd552a0aabd13/src/api/core/accounts.rs#L374](https://github.com/dani-garcia/bitwarden_rs/blob/8d1b72b9512b90775e671b7ba08cd552a0aabd13/src/api/core/accounts.rs#L374)** If I allow signups I'm then able to change an email address.
Author
Owner

@tomuta commented on GitHub (Jan 6, 2020):

I think this might be a problem in can_signup_user(). I believe the function should return true if the whitelist is empty. Right now it only returns true if a match for the domain is found.

@tomuta commented on GitHub (Jan 6, 2020): I think this might be a problem in `can_signup_user()`. I believe the function should return `true` if the whitelist is empty. Right now it only returns `true` if a match for the domain is found.
Author
Owner

@dani-garcia commented on GitHub (Jan 28, 2020):

This should be fixed now in the latest master, thanks to @tomuta

@dani-garcia commented on GitHub (Jan 28, 2020): This should be fixed now in the latest master, thanks to @tomuta
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#548