User email is not hidden under Single Sign On area of admin page

AI-generated summary

The issue concerns the visibility of user email and external ID under the Single Sign On (SSO) section on the admin users page. Karl_Romanowski reported that while primary and secondary emails are hidden from moderators when site settings restrict access, the SSO email remains visible, creating a security inconsistency. simon acknowledged this as an issue, though not necessarily a bug. techAPJ confirmed the fix was implemented via GitHub commit 00b41437, and later addressed the SSO payload itself, including email, by hiding it behind a button click via commit a174c8b8, following a report by anon60302432.

When viewing a User on the admin/users page the Primary Email and Secondary Email fields are hidden, and require permissions to view:

But the same email is shown unprotected when using SSO further down the page:

Expected: SSO Email is protected like the Primary and Secondary emails.

Actual: SSO Email is not protected, and visible to moderators even when site settings forbid showing emails to moderators.

One more comment, I mentioned email but really even the External ID can be sensitive info too.

2 likes

I’m not sure if this qualifies as a bug, but it’s definitely an issue that needs to be addressed.

3 likes

Fixed via:

https://github.com/discourse/discourse/commit/00b41437b01e740c59203d73b3d74654a8d62d0a

5 likes

@anon60302432 brought into our notice that SSO payload includes email as well so we’ve hidden the payload behind a button click as well, via:

https://github.com/discourse/discourse/commit/a174c8b8d42da08b9a9f13b96dfd17003bdaac86

3 likes