-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathConstants.php
More file actions
91 lines (81 loc) · 2.04 KB
/
Constants.php
File metadata and controls
91 lines (81 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
declare(strict_types=1);
namespace SimpleSAML\XML;
/**
* Various XML constants.
*
* @package simplesamlphp/xml-common
*/
class Constants
{
/**
* The namespace fox XML.
*/
public const NS_XML = 'http://www.w3.org/XML/1998/namespace';
/**
* The namespace fox XML schema.
*/
public const NS_XS = 'http://www.w3.org/2001/XMLSchema';
/**
* The namespace for XML schema instance.
*/
public const NS_XSI = 'http://www.w3.org/2001/XMLSchema-instance';
/**
* The maximum amount of child nodes this library is willing to handle.
* By specification, this limit is 150K, but that opens up for denial of service.
*/
public const UNBOUNDED_LIMIT = 10000;
/**
* The namespace for the XML Path Language 1.0
*/
public const XPATH10_URI = 'http://www.w3.org/TR/1999/REC-xpath-19991116';
/** @var array<string> */
public const DEFAULT_ALLOWED_AXES = [
'ancestor',
'ancestor-or-self',
'attribute',
'child',
'descendant',
'descendant-or-self',
'following',
'following-sibling',
// 'namespace', // By default, we do not allow using the namespace axis
'parent',
'preceding',
'preceding-sibling',
'self',
];
/** @var array<string> */
public const DEFAULT_ALLOWED_FUNCTIONS = [
// 'boolean',
// 'ceiling',
// 'concat',
// 'contains',
// 'count',
// 'false',
// 'floor',
// 'id',
// 'lang',
// 'last',
// 'local-name',
// 'name',
// 'namespace-uri',
// 'normalize-space',
'not',
// 'number',
// 'position',
// 'round',
// 'starts-with',
// 'string',
// 'string-length',
// 'substring',
// 'substring-after',
// 'substring-before',
// 'sum',
// 'text',
// 'translate',
// 'true',
];
/** @var int */
public const XPATH_FILTER_MAX_LENGTH = 100;
}