Skip to content

Commit 40d7469

Browse files
authored
URL decodes params payload
Noticed that when params are sent as POST payload, and Authorization has a `+` value encoded for a space, it was not decoding the value and would fail when trying to retrieve the basic auth information.
1 parent 719b410 commit 40d7469

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/locker/request/Request.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ public function getParams() {
3737
* @return AssocArray params from the payload.
3838
*/
3939
public function getPayloadParams() {
40+
$payload = $this->getPayload();
41+
$decodedPayload = urldecode($payload);
4042
$payloadParams = [];
41-
parse_str($this->getPayload(), $payloadParams); // Parse the payload into an AssocArray.
43+
parse_str($decodedPayload, $payloadParams); // Parse the payload into an AssocArray.
4244
$payloadParams = json_decode(json_encode($payloadParams), true);
4345
return $payloadParams;
4446
}

0 commit comments

Comments
 (0)