Branch: refs/heads/master
Home: https://github.com/openSUSE/software-o-o
Commit: 07ee9277fd13e1078d7bd7a61eb81f0b39e6a7c4
https://github.com/openSUSE/software-o-o/commit/07ee9277fd13e1078d7bd7a61eb8...
Author: Alexander Graul
Date: 2019-10-29 (Tue, 29 Oct 2019)
Changed paths:
M app/controllers/download_controller.rb
M config/routes.rb
Log Message:
-----------
Use constraints for /download routes
Actions don't need to validate if all required parameters are provided
if they are not reached in the first place. Route validations are not a
concern of the action, instead they should be done in config/routes.rb.
This also allows us to remove required_parameters, which causes a lot of
false positive "Unpermitted parameters" log statements.
As a result of using route constraints, no error flashes of this form
"Required Parameter foo missing"
are shown anymore. While we show /download/doc instead, this page is not
specifically pointing to the problem. I don't see this as a big problem
since the flash was lacking already context, users had to guess what a
"Parameter" is and how it should be provided. /download/doc does not
worsen the situation substantially.
Commit: 26c01d01651b87965915af0726abcbbe2bcea506
https://github.com/openSUSE/software-o-o/commit/26c01d01651b87965915af0726ab...
Author: Alexander Graul
Date: 2019-10-29 (Tue, 29 Oct 2019)
Changed paths:
M app/controllers/package_controller.rb
Log Message:
-----------
Remove unneeded required_parameters calls
Routes for the package controller have been using constraints for quite
some time already. There is no need to call required_parameters in this
controllers' actions.
Commit: 226e4a8f343823b43d7b1ba22cd5232dde1e4c04
https://github.com/openSUSE/software-o-o/commit/226e4a8f343823b43d7b1ba22cd5...
Author: Alexander Graul
Date: 2019-10-29 (Tue, 29 Oct 2019)
Changed paths:
M app/controllers/application_controller.rb
Log Message:
-----------
Remove required_parameters function
This function provided a way to ensure that the params hash contains
specific keys. The function is not needed if routes are validated
properly using constraints. As a side effect, required_parameters caused
a lot of false positive "unpermitted parameters" log statements.
required_parameters is not used anywhere in the codebase anymore.
Fixes https://github.com/openSUSE/software-o-o/issues/500.
Commit: f135af7332095e5095d04ddd4eec7ecee28cf7c4
https://github.com/openSUSE/software-o-o/commit/f135af7332095e5095d04ddd4eec...
Author: Alexander Graul
Date: 2019-11-05 (Tue, 05 Nov 2019)
Changed paths:
M app/controllers/application_controller.rb
M app/controllers/download_controller.rb
M app/controllers/package_controller.rb
M config/routes.rb
Log Message:
-----------
Merge pull request #675 from alexandergraul/add-route-constraints
Add route constraints and remove required_parameters
Compare: https://github.com/openSUSE/software-o-o/compare/45df615ae207...f135af733209