[openstreetmap/openstreetmap-website] params[:user] is possible to be nil, and will cause unhandled exception. (#2202)

jwjwyoung notifications at github.com
Wed Apr 10 02:56:40 UTC 2019


https://github.com/openstreetmap/openstreetmap-website/blob/36817f777c502a5a044e82fc3e3ca55f5433d66f/app/controllers/users_controller.rb#L452

Reproduce in /users page 
![image](https://user-images.githubusercontent.com/42279873/55848376-4a8ffc80-5b12-11e9-803a-350a7462b79c.png)

When I don't select any user and click "Confirmed Selected User" button, I will get an error saying params[:user] is nil as bellows.

![image](https://user-images.githubusercontent.com/42279873/55848362-406dfe00-5b12-11e9-86af-92d117cee51b.png)

Better error handler should be provided here, such as enforce at least choose one user. 
 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2202
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190409/c027e72e/attachment.html>


More information about the rails-dev mailing list