Edge case: Discourse SSO error with long user name

(Andrew Waugh) #1

Just noticed this today, it only started recently. I know that it used to work with this user account, as this is the one which I used to test the WP-Discourse SSO!

With a very long user full name, WP-Discourse throws an error: “discourse_sso_error=user_nicename_too_long”.

With username: Jagwaugh_test, and nice name:

This is just a Test Account with normal user privs, If you want to message me use @Andrew_Waugh

I know, it is long enough that one can hardly call it “nice” anymore, but still:

  1. If I can define it in Discourse, then the WP-Discourse should handle it.
  2. Evidently it does sort of handle it, as WP creates the account but doesn’t populate the “Discourse Username” or “First Name” (which are normally mapped to this value)
  3. Users with a long name/nicename can’t login to the WP site with SSO

On a related note - in Discourse settings there are values for “min username length” and “max username length”, but none for “name”. Also, if Discourse refers to the variable as “name” then shouldn’t SSO call it the same? - “name"≠"nicename”.

(Jeff Atwood) #2

Sure maybe a bug for @Simon_Cossar ?