getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.57k stars 4.13k forks source link

user_details.py / UserDetailsEndpoint.put() gets email from wrong request field #77000

Open nvsmirnov opened 1 week ago

nvsmirnov commented 1 week ago

Environment

self-hosted (https://develop.sentry.dev/self-hosted/)

Steps to Reproduce

  1. Have user names which are different from email addresses (i.e. username is "john", email is "john@smith.tld").
  2. Go to Admin/Users/User (pick the user which has verified email)
  3. Make some change (for example, switch Admin status)
  4. Click "Save Changes".

Expected Result

There should be no error while saving changes in this case.

Actual Result

Getting HTTP 400 {"detail": "Verified email address is not found."} despite the fact email is verified.

Simple patch solves the problem, PR: https://github.com/getsentry/sentry/pull/77012

Product Area

Other

Link

No response

DSN

No response

Version

24.8.0

getsantry[bot] commented 1 week ago

Auto-routing to @getsentry/product-owners-issues for triage ⏲️

getsantry[bot] commented 1 week ago

Routing to @getsentry/product-owners-apis for triage ⏲️

leedongwei commented 1 week ago

Thanks for the PR! I'll have someone review it and add tests to prevent a regression.