Username with single quote gets munged (3 posts)

  1. stevepiercy
    Posted 10 years ago #

    Just installed a clean WP 1.5.2. A complete newbie registered with username:

    John O'Brien

    When John tried to login, the system claimed that his username did not exist. I looked in the database, and his username was stored as:

    John O\\\'Brien

    So either two things need to be done: (1) Do not allow users to register usernames containing any non-alphanumeric characters, or (2) don't escape single quotes when a user registers.

    Is there a plug-in that can perform either function, or is this a bug?

  2. moshu
    Posted 10 years ago #

    Usually in usernames you don't use non-alphanumeric characters. The simple workaround is:
    - choose a username like "johnobrien"
    - when logged in change the nickname to "John O'Brien"
    - select display: John O'Brien.

  3. Kafkaesqui

    Posted 10 years ago #

    I agree though that WordPress should be doing some sanity checking for *bad* characters in the login.

Topic Closed

This topic has been closed to new replies.

About this Topic