Skip to content

Username being cast to lowercase without an obvious way to opt out #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Adambean opened this issue Apr 12, 2025 · 0 comments
Open

Comments

@Adambean
Copy link

Hello,

Thanks for this plug-in. This resolves an infinite loop issue recently encountered with the other auth_remoteuser plug-in.

I noticed that this plug-in expects a callable string in $wgAuthRemoteUserUsernameNormalizer otherwise "strtolower" is assumed:

: 'strtolower';

This occurs if setting the variable to null or an empty string too, which could be considered a reasonable way to do no normalisation.

This needs to be opt-out-able otherwise the case sensitivity of usernames is not being respected. E.g. "SomeUser" needs to be kept as "SomeUser", not "Someuser". This matters because:

  • The external authentication backend may handle usernames in a case sensitive way.
  • MediaWiki database tables use binary collation by default, which is case sensitive, therefore this problem causes user duplication for existing people. (Particularly when migrating from the "auth_remoteuser" plug-in.)

In my opinion I'd not make use of strtolower() unless specifically configured. If the variable is null or an empty string leave the username unmodified.

As a workaround setting this variable to "strval" leaves the user casing alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant