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
6060 $ this ->httpBadRequest ('The given identifier is not a valid UUID ' );
6161 }
6262
63+ $ filterStr = rawurldecode (Url::fromRequest ()->getQueryString ());
64+ if ($ method !== 'GET ' && $ filterStr ) {
65+ $ this ->httpBadRequest ('Filter is only allowed for GET requests ' );
66+ }
67+
6368 $ filter = FilterProcessor::assembleFilter (
64- QueryString::fromString (rawurldecode (Url:: fromRequest ()-> getQueryString ()) )
69+ QueryString::fromString ($ filterStr )
6570 ->on (
6671 QueryString::ON_CONDITION ,
6772 function (Filter \Condition $ condition ) {
Original file line number Diff line number Diff line change @@ -65,8 +65,13 @@ public function indexAction(): void
6565 $ this ->httpBadRequest ('The given identifier is not a valid UUID ' );
6666 }
6767
68+ $ filterStr = rawurldecode (Url::fromRequest ()->getQueryString ());
69+ if ($ method !== 'GET ' && $ filterStr ) {
70+ $ this ->httpBadRequest ('Filter is only allowed for GET requests ' );
71+ }
72+
6873 $ filter = FilterProcessor::assembleFilter (
69- QueryString::fromString (rawurldecode (Url:: fromRequest ()-> getQueryString ()) )
74+ QueryString::fromString ($ filterStr )
7075 ->on (
7176 QueryString::ON_CONDITION ,
7277 function (Filter \Condition $ condition ) {
@@ -164,10 +169,6 @@ function (Filter\Condition $condition) {
164169
165170 exit ;
166171 case 'POST ' :
167- if ($ filter !== null ) {
168- $ this ->httpBadRequest ('Cannot filter on POST ' );
169- }
170-
171172 $ data = $ this ->getValidatedData ();
172173
173174 $ db ->beginTransaction ();
You can’t perform that action at this time.
0 commit comments