Blake Erickson
7d09af7eda
FIX: Prevent null-byte searches causing 500 error ( #8226 )
...
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`.
2019-10-22 08:44:52 -06:00
..
2019-10-15 18:41:27 +05:30
2019-04-30 10:27:42 +10:00
2019-10-08 14:15:08 +03:00
2019-08-08 11:58:00 +01:00
2019-09-12 10:41:50 +10:00
2019-08-19 12:38:28 +05:30
2019-06-03 10:15:49 +10:00
2019-05-07 11:19:13 +03:00
2019-05-07 13:12:20 +10:00
2019-05-07 13:12:20 +10:00
2019-04-30 10:27:42 +10:00
2019-05-07 13:12:20 +10:00
2019-04-30 10:27:42 +10:00
2019-04-30 10:27:42 +10:00
2019-05-07 13:12:20 +10:00
2019-09-10 12:27:07 -04:00
2019-04-30 10:27:42 +10:00
2019-05-07 13:12:20 +10:00
2019-08-20 12:38:46 +02:00
2019-04-30 10:27:42 +10:00
2019-06-25 11:20:34 +08:00
2019-09-12 10:41:50 +10:00
2019-05-07 13:12:20 +10:00
2019-07-19 16:39:44 +05:30
2019-09-12 10:41:50 +10:00
2019-09-12 10:41:50 +10:00
2019-05-07 09:33:21 +08:00
2019-04-30 10:27:42 +10:00
2019-10-08 12:10:43 +01:00
2019-04-30 10:27:42 +10:00
2019-05-07 13:12:20 +10:00
2019-05-10 08:34:04 -04:00
2019-05-07 13:12:20 +10:00
2019-09-13 17:16:35 -03:00
2019-10-02 15:51:40 -04:00
2019-05-07 13:12:20 +10:00
2019-05-10 08:34:04 -04:00
2019-09-04 09:56:25 -06:00
2019-07-30 11:33:38 +10:00
2019-04-30 10:27:42 +10:00
2019-10-22 08:44:52 -06:00
2019-10-01 19:08:41 -07:00
2019-04-30 10:27:42 +10:00
2019-04-30 10:27:42 +10:00
2019-09-12 10:41:50 +10:00
2019-04-30 10:27:42 +10:00
2019-04-30 10:27:42 +10:00
2019-04-30 10:27:42 +10:00
2019-05-07 13:12:20 +10:00
2019-09-06 20:38:03 +02:00
2019-05-07 13:12:20 +10:00
2019-10-08 14:15:08 +03:00
2019-10-16 10:39:31 +11:00
2019-04-30 10:27:42 +10:00
2019-07-23 12:16:03 -04:00
2019-04-30 10:27:42 +10:00
2019-05-07 13:12:20 +10:00
2019-10-17 15:46:23 +01:00
2019-05-07 13:12:20 +10:00
2019-04-30 10:27:42 +10:00
2019-04-30 10:27:42 +10:00