3 ms·
It's pretty commonly used in Rails form handling logic though, isn't it?
by tptacek 3y ago
It's pretty commonly used in Rails form handling logic though, isn't it?
- jeremymcanally 3y agoProperly used white list parameter controls (i.e., strong parameters) that are the default Rails behavior at this point would have prevented this bug completely.
- tptacek 3y agoThis is a little like saying the best way to avoid this bug is to not have the bug. But that's true of all bugs. The C apologists used to say, "just bounds check properly!"
- jordinl 3y agoHard to tell what the issue is without actually seeing the code. If I had to guess what they did was: user = User.find_by(email: params[:emails]) params[:emails].each { |email| send_recovery_email(user, email) } Instead of: user = User.find_by(email: params[:emails]) send_recovery_email(user, user.email) if user
- usr1106 3y agoIt's open source, so we should be able to see the code? Edit: Someone has digged it out: https://news.ycombinator.com/item?id=39162126 https://news.ycombinator.com/item?id=39162126