こんにちは、Discourse!
最近サイトを始めたのですが、下記に記載されている問題に遭遇しました。
問題
シングルサインオン(SSO)ペイロードを送信すると、常にユーザー名「賢治」が自動的に「賢治1」に変更されてしまいます。
奇妙なことに、「名前」は「賢治」のままで問題ないのですが、ユーザー名だけが変更されます。これは何らかのユーザー名の重複に関する問題ではないかと思われますが、Railsコンソールで確認したところ、「賢治」というユーザー名は存在しません。他に重複制約を確認すべき場所はありますか?特殊文字の問題でしょうか?
コンテキスト
最近Discourseサイトを始めたばかりで、当初は「Unicodeユーザー名」のチェックを外していました。しかし、設定を更新した後、影響を受けたユーザーをすべて更新しました。名前に特殊文字を持つ他のユーザーは、ユーザー名に数字が追加されることはありませんでした。
Unicode設定
「Unicodeユーザー名」 → 許可
「許可されるUnicodeユーザー名文字」 → [\p{Han}\p{Katakana}\p{Hiragana}]
ペイロード
name=%E8%B3%A2%E6%B2%BB
username=%E8%B3%A2%E6%B2%BB
何かお手伝いいただけると幸いです。ありがとうございます!
「いいね!」 1
maiki
(maiki)
2022 年 6 月 12 日午後 5:55
2
こんにちは @sweetbeems !
I have not run into this particular issue, but this…
…made me think of the min username length setting.
Did that user have more characters in their name? The default of min username length is 3, so maybe setting that to 2 will resolve this issue.
「いいね!」 3
Ah, wonderful!! @maiki you’re completely right and that fixed it! Changing to two was the solution. I may even need to change to one…
ありがとうございます!!
「いいね!」 3
maiki
(maiki)
2022 年 6 月 12 日午後 6:10
4
どういたしまして.
Glad that worked! If you think you may have users using a single unicode character for a username, then you probably need to change that setting to 1; otherwise they won’t be able to sign-up unless they use 2 characters.
「いいね!」 2
はい、シングルサインオンで認証しているメインサイトには最小制限がないため、最小1文字にしました
「いいね!」 2
system
(system)
クローズされました:
2022 年 10 月 27 日午前 11:34
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.