Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Immanuel Onyeka a4b74eb6e1 Pass user current user to grav in header 11 months ago
..
.github/workflows Pass user current user to grav in header 11 months ago
src Setup grav 1 year ago
COPYRIGHT.md Setup grav 1 year ago
LICENSE.md Setup grav 1 year ago
README.md Setup grav 1 year ago
composer.json Setup grav 1 year ago
composer.lock Setup grav 1 year ago

README.md

laminas-xml

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee. If you have a security issue, please follow our security reporting guidelines. If you wish to take on the role of maintainer, please nominate yourself

Build Status

An utility component for XML usage and best practices in PHP

Installation

You can install using:

$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install

Notice that this library doesn’t have any external dependencies, the usage of composer is for autoloading and standard purpose.

Laminas\Xml\Security

This is a security component to prevent XML eXternal Entity (XXE) and XML Entity Expansion (XEE) attacks on XML documents.

The XXE attack is prevented disabling the load of external entities in the libxml library used by PHP, using the function libxml_disable_entity_loader.

The XEE attack is prevented looking inside the XML document for ENTITY usage. If the XML document uses ENTITY the library throw an Exception.

We have two static methods to scan and load XML document from a string (scan) and from a file (scanFile). You can decide to get a SimpleXMLElement or DOMDocument as result, using the following use cases:

use Laminas\Xml\Security as XmlSecurity;

$xml = <<<XML
    <?xml version="1.0"?>
    <results>
        <result>test</result>
    </results>
    XML;

// SimpleXML use case
$simplexml = XmlSecurity::scan($xml);
printf ("SimpleXMLElement: %s\n", ($simplexml instanceof \SimpleXMLElement) ? 'yes' : 'no');

// DOMDocument use case
$dom = new \DOMDocument('1.0');
$dom = XmlSecurity::scan($xml, $dom);
printf ("DOMDocument: %s\n", ($dom instanceof \DOMDocument) ? 'yes' : 'no');