[openstreetmap/openstreetmap-website] link to user is case sensitive while user display name is case insensitive (#2203)
notifications at github.com
Wed Apr 10 03:06:13 UTC 2019
I am using the postgresql database.
When I have a user name "ABC", then I can access it through the link `/user/ABC`, while I cannot access it through` /user/abc`, or any other combination of the mixed-case link. It's caused by the code https://github.com/openstreetmap/openstreetmap-website/blob/36817f777c502a5a044e82fc3e3ca55f5433d66f/app/controllers/users_controller.rb#L372, which will parse the original form of parameters.
I guess we could change the code to:
`@this_user = User.where('lower(display_name) = ?', params[:display_name].downcase).first`
which make /user/abc and /user/ABC refer to the same person.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rails-dev