File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,13 @@ public function indexAction(): void
60
60
$ this ->httpBadRequest ('The given identifier is not a valid UUID ' );
61
61
}
62
62
63
+ $ filterStr = rawurldecode (Url::fromRequest ()->getQueryString ());
64
+ if ($ method !== 'GET ' && $ filterStr ) {
65
+ $ this ->httpBadRequest ('Filter is only allowed for GET requests ' );
66
+ }
67
+
63
68
$ filter = FilterProcessor::assembleFilter (
64
- QueryString::fromString (rawurldecode (Url:: fromRequest ()-> getQueryString ()) )
69
+ QueryString::fromString ($ filterStr )
65
70
->on (
66
71
QueryString::ON_CONDITION ,
67
72
function (Filter \Condition $ condition ) {
Original file line number Diff line number Diff line change @@ -65,8 +65,13 @@ public function indexAction(): void
65
65
$ this ->httpBadRequest ('The given identifier is not a valid UUID ' );
66
66
}
67
67
68
+ $ filterStr = rawurldecode (Url::fromRequest ()->getQueryString ());
69
+ if ($ method !== 'GET ' && $ filterStr ) {
70
+ $ this ->httpBadRequest ('Filter is only allowed for GET requests ' );
71
+ }
72
+
68
73
$ filter = FilterProcessor::assembleFilter (
69
- QueryString::fromString (rawurldecode (Url:: fromRequest ()-> getQueryString ()) )
74
+ QueryString::fromString ($ filterStr )
70
75
->on (
71
76
QueryString::ON_CONDITION ,
72
77
function (Filter \Condition $ condition ) {
@@ -164,10 +169,6 @@ function (Filter\Condition $condition) {
164
169
165
170
exit ;
166
171
case 'POST ' :
167
- if ($ filter !== null ) {
168
- $ this ->httpBadRequest ('Cannot filter on POST ' );
169
- }
170
-
171
172
$ data = $ this ->getValidatedData ();
172
173
173
174
$ db ->beginTransaction ();
You can’t perform that action at this time.
0 commit comments