Commit e72f2cfc authored by Stan Hu's avatar Stan Hu

Fix missing constraints causing route failures when usernames with periods are used

Closes #23131
parent ed2fe984
...@@ -15,7 +15,10 @@ devise_scope :user do ...@@ -15,7 +15,10 @@ devise_scope :user do
end end
constraints(UserUrlConstrainer.new) do constraints(UserUrlConstrainer.new) do
scope(path: ':username', as: :user, controller: :users) do scope(path: ':username',
as: :user,
constraints: { username: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ },
controller: :users) do
get '/', action: :show get '/', action: :show
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment