]> git.openstreetmap.org Git - rails.git/commit
Anchor legale parameter validation to the whole string
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 5 Aug 2026 13:12:40 +0000 (14:12 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 5 Aug 2026 13:12:40 +0000 (14:12 +0100)
commitc39f3a485bb2457af9d09555380c30957966b5e8
treeef3512fbed96643631a8b715c407b760711febdb
parent08eaa40b9cbb3b838cf99e6ec229c31526cf8707
Anchor legale parameter validation to the whole string

Ruby's ^ and $ match at line boundaries, and rails_param tests the
format with a bare =~, so a value such as "../../config/settings\nGB"
satisfied /^[A-Z]+$/.
app/controllers/accounts/terms_controller.rb
test/controllers/accounts/terms_controller_test.rb