Changing (normal) user email without verification

AI-generated summary

In a discussion titled “Changing (normal) user email without verification” under the Feature category, Stephen raises a practical concern: administrators should be able to change a standard user’s email address without triggering a verification email — especially when the user is unavailable or unresponsive. He notes that while admins can trigger the change, they can’t authorize it themselves, forcing them to use rails c for direct database edits, which he considers unnecessarily cumbersome for non-SSO sites. codinghorror initially questions the intent, then Stephen clarifies that while security is important for privileged accounts, restricting admins from changing basic user attributes like email feels excessive — especially since admins already have full access to user PII and can alter other recovery settings without user consent. codinghorror counters that allowing this would create a “massive security hole,” citing the project’s high obligations as open-source software. Stephen pushes back, arguing that since malicious admins can already bypass safeguards via rails c, the restriction only hinders legitimate use — comparing it to anti-piracy measures that inconvenience honest users. pfaffman defends email verification, citing real-world cases of misdirected emails and noting that even Google Apps requires verification before forwarding mail. Stephen concedes that verification is useful for data export, but emphasizes that admins routinely alter recovery settings without user approval — suggesting that preventing email changes is “security by obscurity” and increases the risk of human error in the rails console more than it protects the system.

You’ve probably got first-hand experience of the kind of situation. A senior stakeholder who wants something done without any intervention on their part. In this case a senior user wants their associated email address changed, and made it clear to the support team they weren’t to be disturbed until it was done.

They’re a standard user, as an administrator I can trigger the same email change that they would make, but I can’t authorize that change myself, it sends the usual message to the new mailbox- which is useless.

On this occasion I used rails c to make the necessary change, but for sites which don’t have SSO should this be strictly necessary with standard users?

So edit the database directly, which you’re already doing? Not sure what the question is?

I understand the need to email accounts when altering accounts that have any degree of power to moderate or administer, but preventing an administrator from altering an email address (and forcing them to SSH into a server) feels OTT.

As an administrator of active directory I can use the normal gui tools to change pretty much anything, from the Google Apps domains I administer again very little is restricted, but for some reason Discourse doesn’t allow an administrator to change a user attribute.

It’d be a massive security hole, if we did. Our obligations as an open source project with freely distributable code are quite high.

Why massive?

The obligations are to protect PII, the email address is already exposed to administrators. You’ve acknowledged that someone with rails access can alter the database directly- I’m not suggesting that all moderators should be able to do this, but maybe it makes sense for Administrators to be able to make administrative changes without getting their hands in the guts of the database.

If the purpose of an administrator being able to update an email address at all is because an old email account has been lost, then there’s nothing stopping an email that isn’t in control of the user being specified. Someone acting out of malice still has the fallback of dropping into rails. It has the feel of the anti-piracy notice on a blu-ray, getting in the way of people doing stuff legitimately.

You’ve changed their email address. It doesn’t seem like a huge pain for them to click a “yes, this is my email address” link in email. It keeps you from accidentally switching to some email address that’s not theirs. My wife regularly gets email for wedding planning, announcing that a kid is a the YMCA, and so on because someone with a similar gmail address can’t type. It was really, really, hard to get the YMCA to stop sending mail about little Pat being at after school care (I had to look up a phone number and the person that I talked to didn’t seem to know who to contact to fix the problem) .

Requiring people to validate their email address seems like a really good idea.

I’m pretty sure that Google Apps makes you verify an email address before you start forwarding mail there.

1 Like

Sure, to move data off-platform a user has to confirm that they own the destination, just as Discourse emails out backup links. OTOH as an administrator if I go in and change any of the profile options associated with account recovery including backup email, phone number, etc, the user isn’t even notified. I can add aliases to accounts, rename accounts, nothing requires user approval.

Preventing admins from changing email addresses is security by obscurity at best, if an admin is acting maliciously you’re already well past the point of no-return. There’s more risk of an admin screwing up something in the rails console by forcing them down that avenue than risk to an installation by allowing them to perform simple administrative tasks.

1 Like