[openstreetmap/openstreetmap-website] Limit note comment size to 2000 characters (#2042)
notifications at github.com
Sat Nov 3 17:35:49 UTC 2018
Follow up for #1543
There's essentially no upper limit to notes comments, leaving the upload more or less unprotected to nonsense stuff like https://upload.apis.dev.openstreetmap.org/note/3
PR attempts to set the limit to 2000 characters both in the model, as well in the textarea (to avoid dealing with an unhappy backend). I'm not sure anything else needs to be done to deal with existing (too long) comments.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* Limit notes sizes to 2000 characters
-- File Changes --
M app/models/note_comment.rb (3)
M app/views/browse/new_note.html.erb (2)
M app/views/browse/note.html.erb (2)
-- Patch Links --
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