Skip to content

Conversation

@smg6511
Copy link
Collaborator

@smg6511 smg6511 commented Dec 31, 2025

What does it do?

Created a new, more explicit lexicon for condition where a mail failure occurs when attempting to send a new password activation email.

Why is it needed?

The original message shown appears incomplete.

How to test

  1. While logged in, clear modx cache to ensure new lexicon is picked up
  2. Ensure your system settings for sending mail are set in a way that will trigger a mail server error (e.g., specify an incorrect port)
  3. Logout and click "Forgot your password?"
  4. Enter an email of any legitimate manager user
  5. Verify a new, more clear error message shows when clicking "Send Activation Email"

Related issue(s)/PR(s)

Resolves #13951

Fix activation email failure message
Spacing and other minor formatting/CQ fixes
@smg6511 smg6511 added type-frontend Issues related to UI/UX issues, mostly about styles and frontend implementations on JavaScript. pr/review-needed Pull request requires review and testing. labels Jan 6, 2026
Copy link
Member

@opengeek opengeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having trouble reviewing this as I am seemingly unable to cause a mail server error even before checking out this PR to test.

@smg6511
Copy link
Collaborator Author

smg6511 commented Jan 6, 2026

seemingly unable to cause a mail server error

I just set my mail_smtp_hosts sys setting to a non-valid host (in my case localhost:1020)

@opengeek opengeek self-requested a review January 6, 2026 21:02
Copy link
Member

@opengeek opengeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now my concern is that the error only shows if you enter a valid username/email address. If I put in an invalid username/email address, the regular success message shows. This could be a way of allowing bad actors to test for usernames/email addresses.

@smg6511
Copy link
Collaborator Author

smg6511 commented Jan 6, 2026

Now my concern is that the error only shows if you enter a valid username/email address.

Yeah, and that's the way it has been; I didn't make a change toward that behavior. Here's the thing though: IMO being vague about whether someone's login attempt is being made with a valid user (name/email) probably isn't providing much security.

I actually find it incredibly annoying as a user (in reference to other sites, particularly ones I have an account for but may not have visited for a long time) when I go through a forgot/send me my password process that responds with "if you have an account with us you'll receive an email with..." — just tell me if I don't have an account by X name; it gives you the hint to look more carefully at what you submitted (was there a small typo, etc?). A decent amount of the time I'll know I entered the correct info for at least a previously active account and get no response, presumably because of problems in the site's notification system.

Anyway, that's my soapbox on the matter—just giving my perspective and not necessarily a hard argument one way or the other ;-) In any case, how about I go ahead and make the frontend feedback a little more general and provide a log message that gives the sys admin a better hint of what's going on?

@opengeek
Copy link
Member

opengeek commented Jan 6, 2026

Yeah, and that's the way it has been; I didn't make a change toward that behavior. Here's the thing though: IMO being vague about whether someone's login attempt is being made with a valid user (name/email) probably isn't providing much security.

I actually find it incredibly annoying as a user (in reference to other sites, particularly ones I have an account for but may not have visited for a long time) when I go through a forgot/send me my password process that responds with "if you have an account with us you'll receive an email with..." — just tell me if I don't have an account by X name; it gives you the hint to look more carefully at what you submitted (was there a small typo, etc?). A decent amount of the time I'll know I entered the correct info for at least a previously active account and get no response, presumably because of problems in the site's notification system.

I won't argue how much security it provides, but it is a commonly known vulnerability when a site exposes a valid username/email address from user input like this. This gives an attacker a way to narrow down attempts to crack the password for a known user.

Anyway, that's my soapbox on the matter—just giving my perspective and not necessarily a hard argument one way or the other ;-) In any case, how about I go ahead and make the frontend feedback a little more general and provide a log message that gives the sys admin a better hint of what's going on?

I'll take this as-is and figure out if exposing a valid user this way can be avoided here some other way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/review-needed Pull request requires review and testing. type-frontend Issues related to UI/UX issues, mostly about styles and frontend implementations on JavaScript.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MODX 3: Login - Forgot your password error message if no mail service installed

2 participants