Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
path.php
1
<?php
9
namespace
Bitrix\Security\Filter\Auditor
;
10
18
class
Path
19
extends
Base
20
{
21
protected
$name
=
'PHP'
;
22
23
protected
function
getFilters
()
24
{
25
$filters
= array();
26
$filters
[
'#((?:[\\\/]|%2f|%5c)(?:\.|%2e))((?:\.|%2e)(?:[\\\/]|%2f|%5c))#is'
] = $this->
getSplittingString
(2);
27
if
(
28
(!defined(
'PHP_OS'
))
29
|| (mb_strtoupper(mb_substr(PHP_OS, 0, 3)) ===
'WIN'
)
30
)
31
{
32
$slashes =
'\\\/\x20\x22\x3c\x3e\x5c'
;
33
}
34
else
35
{
36
$slashes =
'\\\/'
;
37
}
38
39
$filters
[
'#(?:\.['
.$slashes.
']+){30,}#'
] =
' X '
;
40
41
$result = array(
42
'search'
=> array_keys(
$filters
),
43
'replace'
=>
$filters
44
);
45
return
$result;
46
}
47
48
}
Bitrix\Security\Filter\Auditor\Base
Definition
base.php:18
Bitrix\Security\Filter\Auditor\Base\getSplittingString
getSplittingString($splitItemsCount=2, $customSplitChar='')
Definition
base.php:137
Bitrix\Security\Filter\Auditor\Base\$filters
$filters
Definition
base.php:22
Bitrix\Security\Filter\Auditor\Path
Definition
path.php:20
Bitrix\Security\Filter\Auditor\Path\getFilters
getFilters()
Definition
path.php:23
Bitrix\Security\Filter\Auditor\Path\$name
$name
Definition
path.php:21
Bitrix\Security\Filter\Auditor
Definition
base.php:9
modules
security
lib
filter
auditor
path.php
Создано системой
1.10.0