mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 06:44:33 +02:00
parent
c810f2bfd1
commit
24c8a924e6
@ -269,6 +269,20 @@ class FilterTest extends BaseTestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test whether special characters inside values are URL-encoded, but the other ones aren't
|
||||||
|
*/
|
||||||
|
public function testSpecialCharacterEscaping()
|
||||||
|
{
|
||||||
|
$this->assertSame(
|
||||||
|
Filter::matchAll(
|
||||||
|
Filter::expression('host', '!=', 'localhost'),
|
||||||
|
Filter::matchAny(Filter::where('service', 'ping4'), Filter::where('specialchars', '(|&!=)'))
|
||||||
|
)->toQueryString(),
|
||||||
|
'host!=localhost&(service=ping4|specialchars=%28%7C%26%21%3D%29)'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
private function row($idx)
|
private function row($idx)
|
||||||
{
|
{
|
||||||
return $this->sampleData[$idx];
|
return $this->sampleData[$idx];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user