Skip to content

Commit

Permalink
Don't decode the filter url
Browse files Browse the repository at this point in the history
Leave this to QueryString::fromString() method.
  • Loading branch information
sukhwinder33445 committed Jul 16, 2024
1 parent 4aa08e0 commit 8838575
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion application/controllers/ApiV1ChannelsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function indexAction(): void
}

try {
$filterRule = QueryString::fromString(rawurldecode(Url::fromRequest()->getQueryString()))
$filterRule = QueryString::fromString(Url::fromRequest()->getQueryString())
->on(
QueryString::ON_CONDITION,
function (Filter\Condition $condition) {
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/ApiV1ContactgroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function indexAction(): void
$this->httpBadRequest('The given identifier is not a valid UUID');
}

$filterStr = rawurldecode(Url::fromRequest()->getQueryString());
$filterStr = Url::fromRequest()->getQueryString();
if ($method !== 'GET' && $filterStr) {
$this->httpBadRequest('Filter is only allowed for GET requests');
}
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/ApiV1ContactsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function indexAction(): void
$this->httpBadRequest('The given identifier is not a valid UUID');
}

$filterStr = rawurldecode(Url::fromRequest()->getQueryString());
$filterStr = Url::fromRequest()->getQueryString();
if ($method !== 'GET' && $filterStr) {
$this->httpBadRequest('Filter is only allowed for GET requests');
}
Expand Down

0 comments on commit 8838575

Please sign in to comment.