Skip to content

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

Description

@Adambean

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions