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-18 01:49:26 +02:00
2019-10-08 12:10:43 +01:00
2019-10-02 14:01:53 +10:00
2019-10-08 14:15:08 +03:00
2019-05-13 09:31:32 +08:00
2019-10-16 17:08:43 -03:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2018-11-14 16:23:29 -05:00
2019-10-21 12:08:20 +01:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-08 14:15:08 +03:00
2019-07-22 14:59:56 +03:00
2019-08-20 12:38:46 +02:00
2019-05-13 09:31:32 +08:00
2019-05-06 16:07:49 +02:00
2019-10-09 13:06:18 +11:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 15:07:37 +10:00
2019-10-21 13:21:12 +01:00
2019-09-22 00:20:25 -04:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-09-13 17:14:31 -03:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:55:44 +08:00
2019-10-02 14:01:53 +10:00
2019-07-15 20:47:44 +03:00
2019-05-13 09:31:32 +08:00
2019-10-22 08:44:52 -06:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-10-02 14:01:53 +10:00
2019-10-14 11:40:09 +05:30
2019-10-02 14:01:53 +10:00
2019-10-21 12:08:20 +01:00
2019-03-15 17:16:15 +11:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:28:18 +10:00
2019-10-21 12:08:20 +01:00
2019-05-13 10:25:51 -04:00
2019-10-21 12:08:20 +01:00
2019-10-14 15:40:33 +11:00
2019-09-09 11:03:57 -04:00
2019-07-23 12:16:03 -04:00
2019-10-02 14:01:53 +10:00
2019-10-21 12:08:20 +01:00
2019-10-16 16:53:44 +11:00
2019-10-02 14:01:53 +10:00
2019-05-13 09:31:32 +08:00
2019-10-02 14:01:53 +10:00