[openstreetmap/openstreetmap-website] Ignore invalid object IDs in various redirects (PR #7372)
Andy Allan
notifications at github.com
Wed Sep 9 17:07:55 UTC 2026
@gravitystorm requested changes on this pull request.
otherwise lgtm
> @@ -171,4 +171,8 @@ def redirect_map_params
redirect_to params.to_unsafe_h.merge(:only_path => true, :anchor => anchor.join("&")) if anchor.present?
end
+
+ def valid_id?(candidate)
+ candidate&.match?(/^\d+$/)
Probably want to use `match?(/\A\d+\z/)` , similar to #7295
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7372#pullrequestreview-5157527700
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/7372/review/5157527700 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260909/a1f1b13f/attachment.htm>
More information about the rails-dev
mailing list