Skip to content

Commit 097d446

Browse files
committed
Changed: don't return server.ip as array, but string instead.
1 parent dda0768 commit 097d446

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ public function getParameterValue($parameter, $data = [])
427427

428428
// Special condition for the IP address.
429429
if ($type === 'server' && $t[0] === 'ip') {
430-
return [$this->extension->getIpAddress()];
430+
return $this->extension->getIpAddress();
431431
}
432432

433433
// Just one parameter we have to match against.

tests/data/Rules.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
},
8282
{
8383
"id":11,
84-
"title":"Determine if a POST parameter is a numeric.",
84+
"title":"Determine if the URL matches a regex",
8585
"rules":[{"parameter":"server.REQUEST_URI","match":{"type":"regex","value":"\/(\\\/something\\\/)\/msi"}}],
8686
"cat":"TEST",
8787
"type":"BLOCK",

tests/data/Whitelist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"id":1,
44
"title":"Whitelist IP 127.0.0.1",
5-
"rules":[{"parameter":"server.ip","match":{"type":"array_in_array","value":["127.0.0.1"]}}],
5+
"rules":[{"parameter":"server.ip","match":{"type":"in_array","value":["127.0.0.1"]}}],
66
"type":"WHITELIST"
77
},
88
{

0 commit comments

Comments
 (0)