mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 04:13:22 +08:00
7d09af7eda
This fix ensures that searches that contain a null byte return a 400 error instead of causing a 500 error. For some reason from rspec we will reach the raise statement inside of the `rescue_from ArgumentError` block, but outside of rspec it will not execute the raise statement and so a 500 is thrown instead of reaching the `rescue_from Discourse::InvalidParameters` block inside of the application controller. This fix raises Discourse::InvalidParameters directly from the search controller instead of relying on `PG::Connection.escape_string` to raise the `ArgumentError`. |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
jobs | ||
mailers | ||
models | ||
serializers | ||
services | ||
views |