[openstreetmap/openstreetmap-website] Ignore invalid object IDs in various redirects (PR #7372)

Tom Hughes notifications at github.com
Wed Sep 9 21:59:24 UTC 2026


@tomhughes commented on this pull request.



> @@ -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+$/)

Indeed... Now changed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7372#discussion_r3973387261
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7372/review/5160320081 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260909/d19314db/attachment-0001.htm>


More information about the rails-dev mailing list