Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct () | |
setXMLOptions ($xmlOptions) | |
getXMLOptions () | |
getAllowedTags () | |
setAllowedTags (TagInterface $allowedTags) | |
getAllowedAttrs () | |
setAllowedAttrs (AttributeInterface $allowedAttrs) | |
removeRemoteReferences ($removeRemoteRefs=false) | |
getXmlIssues () | |
sanitize ($dirty) | |
minify ($shouldMinify=false) | |
removeXMLTag ($removeXMLTag=false) | |
useThreshold ($useThreshold=1000) | |
setUseNestingLimit ($limit) | |
Fonctions membres protégées | |
resetInternal () | |
setUpBefore () | |
resetAfter () | |
cleanAttributesOnWhitelist (\DOMElement $element) | |
cleanXlinkHrefs (\DOMElement $element) | |
cleanHrefs (\DOMElement $element) | |
isHrefSafeValue ($value) | |
removeNonPrintableCharacters ($value) | |
hasRemoteReference ($value) | |
isAriaAttribute ($attributeName) | |
isDataAttribute ($attributeName) | |
isUseTagDirty (\DOMElement $element) | |
isUseTagExceedingThreshold (\DOMElement $element) | |
Attributs protégés | |
$xmlDocument | |
$allowedTags | |
$allowedAttrs | |
$xmlLoaderValue | |
$minifyXML = false | |
$removeRemoteReferences = false | |
$useThreshold = 1000 | |
$removeXMLTag = false | |
$xmlOptions = LIBXML_NOEMPTYTAG | |
$xmlIssues = array() | |
$elementReferenceResolver | |
$useNestingLimit = 15 | |
__construct | ( | ) |
Références AllowedAttributes\getAttributes(), et AllowedTags\getTags().
|
protected |
Only allow attributes that are on the whitelist
\DOMElement | $element |
This is used for when a namespace isn't imported properly. Such as xlink:href when the xlink namespace isn't imported. We have to do this as the link is still ran in this case.
Références $href, Sanitizer\hasRemoteReference(), Sanitizer\isAriaAttribute(), Sanitizer\isDataAttribute(), Sanitizer\isHrefSafeValue(), et Sanitizer\removeRemoteReferences().
|
protected |
Clean the hrefs of script and data embeds
\DOMElement | $element |
Références $href, et Sanitizer\isHrefSafeValue().
|
protected |
Clean the xlink:hrefs of script and data embeds
\DOMElement | $element |
Références Sanitizer\isHrefSafeValue().
getAllowedAttrs | ( | ) |
getAllowedTags | ( | ) |
getXmlIssues | ( | ) |
getXMLOptions | ( | ) |
Get XML options to use when saving XML See: DOMDocument::saveXML
Références Sanitizer\$xmlOptions.
|
protected |
Does this attribute value have a remote reference?
$value |
Références $value, et Sanitizer\removeNonPrintableCharacters().
Référencé par Sanitizer\cleanAttributesOnWhitelist().
|
protected |
Check to see if an attribute is an aria attribute or not
$attributeName |
Référencé par Sanitizer\cleanAttributesOnWhitelist().
|
protected |
Check to see if an attribute is an data attribute or not
$attributeName |
Référencé par Sanitizer\cleanAttributesOnWhitelist().
|
protected |
Only allow whitelisted starts to be within the href.
This will stop scripts etc from being passed through, with or without attempting to hide bypasses. This stops the need for us to use a complicated script regex.
$value |
Références $value.
Référencé par Sanitizer\cleanAttributesOnWhitelist(), Sanitizer\cleanHrefs(), et Sanitizer\cleanXlinkHrefs().
|
protected |
Make sure our use tag is only referencing internal resources
\DOMElement | $element |
|
protected |
Determines whether <use ... xlink:href="#identifier">
is expanded recursively in order to create DoS scenarios. The amount of a actually used element needs to be below $this->useThreshold
.
\DOMElement | $element |
minify | ( | $shouldMinify = false | ) |
Should we minify the output?
bool | $shouldMinify |
|
protected |
Removes non-printable ASCII characters from string & trims it
string | $value |
Références $value.
Référencé par Sanitizer\hasRemoteReference().
removeRemoteReferences | ( | $removeRemoteRefs = false | ) |
Should we remove references to remote files?
bool | $removeRemoteRefs |
Référencé par Sanitizer\cleanAttributesOnWhitelist().
removeXMLTag | ( | $removeXMLTag = false | ) |
Should we remove the XML tag in the header?
bool | $removeXMLTag |
Référencé par Sanitizer\sanitize().
|
protected |
Reset the class after use
Référencé par Sanitizer\sanitize().
|
protected |
sanitize | ( | $dirty | ) |
Sanitize the passed string
string | $dirty |
Références $this, Sanitizer\removeXMLTag(), Sanitizer\resetAfter(), Sanitizer\resetInternal(), et Sanitizer\setUpBefore().
setAllowedAttrs | ( | AttributeInterface | $allowedAttrs | ) |
Set custom allowed attributes
AttributeInterface | $allowedAttrs |
Références Fig\Link\getAttributes().
setAllowedTags | ( | TagInterface | $allowedTags | ) |
Set custom allowed tags
TagInterface | $allowedTags |
|
protected |
Set up libXML before we start
Référencé par Sanitizer\sanitize().
setUseNestingLimit | ( | $limit | ) |
Set the nesting limit for <use> tags.
$limit |
setXMLOptions | ( | $xmlOptions | ) |
Set XML options to use when saving XML See: DOMDocument::saveXML
int | $xmlOptions |
Références Sanitizer\$xmlOptions.
useThreshold | ( | $useThreshold = 1000 | ) |
Whether <use ... xlink:href="#identifier">
elements shall be removed in case expansion would exceed this threshold.
int | $useThreshold |
|
protected |
Référencé par Sanitizer\getAllowedAttrs().
|
protected |
Référencé par Sanitizer\getAllowedTags().
|
protected |
|
protected |
Référencé par Sanitizer\resetInternal().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Référencé par Sanitizer\getXmlIssues().
|
protected |
|
protected |
Référencé par Sanitizer\getXMLOptions(), et Sanitizer\setXMLOptions().