Title: Bug: user_nicename can get mangled
Last modified: August 22, 2016

---

# Bug: user_nicename can get mangled

 *  Resolved [David E. Smith](https://wordpress.org/support/users/desmith/)
 * (@desmith)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/bug-user_nicename-can-get-mangled/)
 * Line 453 of shibboleth.php is intended to fix a user_nicename issue, thus:
 * \`
    add_filter( ‘shibboleth_user_nicename’, ‘sanitize_user’ ); `
 * I’m not sure when, but it looks like sanitize_user() may have changed. It now
   considers periods legal, which means the bug that line was intended to fix has
   popped back up.
 * I’m fixing it for now with an outside filter, but I think the “right” fix is 
   to do the necessary additional sanitizing in the plugin. (A call to sanitize_title
   will do in a pinch, but probably has extra side effects.)
 * [https://wordpress.org/plugins/shibboleth/](https://wordpress.org/plugins/shibboleth/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [David E. Smith](https://wordpress.org/support/users/desmith/)
 * (@desmith)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/bug-user_nicename-can-get-mangled/#post-5307930)
 * Following up to my own post here: One of the devs here dug into this a bit more
   deeply than I did, and concluded this actually was/is a bug in WordPress itself:
   [https://core.trac.wordpress.org/ticket/29696](https://core.trac.wordpress.org/ticket/29696)
 * This issue should be fixed in WordPress 4.1.
 * In the meantime, I’m still working around it with this:
 * `add_filter('pre_user_nicename', 'sanitize_title');`

Viewing 1 replies (of 1 total)

The topic ‘Bug: user_nicename can get mangled’ is closed to new replies.

 * ![](https://ps.w.org/shibboleth/assets/icon-256x256.png?rev=3471676)
 * [Shibboleth](https://wordpress.org/plugins/shibboleth/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shibboleth/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shibboleth/)
 * [Active Topics](https://wordpress.org/support/plugin/shibboleth/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shibboleth/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shibboleth/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [David E. Smith](https://wordpress.org/support/users/desmith/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/bug-user_nicename-can-get-mangled/#post-5307930)
 * Status: resolved