diff options
Diffstat (limited to 'src/tests/xxe')
| -rw-r--r-- | src/tests/xxe/disable_xxe_dom_disabled_php8.phpt | 10 | ||||
| -rw-r--r-- | src/tests/xxe/disable_xxe_dom_php8.phpt | 13 |
2 files changed, 10 insertions, 13 deletions
diff --git a/src/tests/xxe/disable_xxe_dom_disabled_php8.phpt b/src/tests/xxe/disable_xxe_dom_disabled_php8.phpt index 01e3349..a78fe2d 100644 --- a/src/tests/xxe/disable_xxe_dom_disabled_php8.phpt +++ b/src/tests/xxe/disable_xxe_dom_disabled_php8.phpt | |||
| @@ -10,6 +10,10 @@ dom | |||
| 10 | --FILE-- | 10 | --FILE-- |
| 11 | <?php | 11 | <?php |
| 12 | $dir = __DIR__; | 12 | $dir = __DIR__; |
| 13 | // Just in case | ||
| 14 | @unlink($dir . "/content.xml"); | ||
| 15 | @unlink($dir . "/content.txt"); | ||
| 16 | |||
| 13 | $content = '<content>WARNING, external entity loaded!</content>'; | 17 | $content = '<content>WARNING, external entity loaded!</content>'; |
| 14 | file_put_contents($dir . '/content.txt', $content); | 18 | file_put_contents($dir . '/content.txt', $content); |
| 15 | 19 | ||
| @@ -49,9 +53,3 @@ default setting with LIBXML_NOENT: WARNING, external entity loaded! | |||
| 49 | default setting without LIBXML_NOENT: | 53 | default setting without LIBXML_NOENT: |
| 50 | disabled entity loader with LIBXML_NOENT: WARNING, external entity loaded! | 54 | disabled entity loader with LIBXML_NOENT: WARNING, external entity loaded! |
| 51 | disabled entity loader without LIBXML_NOENT: | 55 | disabled entity loader without LIBXML_NOENT: |
| 52 | --CLEAN-- | ||
| 53 | <?php | ||
| 54 | $dir = __DIR__; | ||
| 55 | unlink($dir . "/content.xml"); | ||
| 56 | unlink($dir . "/content.txt"); | ||
| 57 | ?> | ||
diff --git a/src/tests/xxe/disable_xxe_dom_php8.phpt b/src/tests/xxe/disable_xxe_dom_php8.phpt index 485828f..133f87e 100644 --- a/src/tests/xxe/disable_xxe_dom_php8.phpt +++ b/src/tests/xxe/disable_xxe_dom_php8.phpt | |||
| @@ -10,6 +10,11 @@ dom | |||
| 10 | --FILE-- | 10 | --FILE-- |
| 11 | <?php | 11 | <?php |
| 12 | $dir = __DIR__; | 12 | $dir = __DIR__; |
| 13 | |||
| 14 | // Just in case | ||
| 15 | @unlink($dir . "/content.xml"); | ||
| 16 | @unlink($dir . "/content.txt"); | ||
| 17 | |||
| 13 | $content = '<content>WARNING, external entity loaded!</content>'; | 18 | $content = '<content>WARNING, external entity loaded!</content>'; |
| 14 | file_put_contents($dir . '/content.txt', $content); | 19 | file_put_contents($dir . '/content.txt', $content); |
| 15 | 20 | ||
| @@ -48,12 +53,6 @@ printf("disabled entity loader without LIBXML_NOENT: %s\n", $dom->getElementsByT | |||
| 48 | default setting with LIBXML_NOENT: WARNING, external entity loaded! | 53 | default setting with LIBXML_NOENT: WARNING, external entity loaded! |
| 49 | default setting without LIBXML_NOENT: | 54 | default setting without LIBXML_NOENT: |
| 50 | 55 | ||
| 51 | Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_set_external_entity_loader was tried and nopped in %a.php on line 26 | 56 | Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_set_external_entity_loader was tried and nopped in %a.php on line %d |
| 52 | disabled entity loader with LIBXML_NOENT: WARNING, external entity loaded! | 57 | disabled entity loader with LIBXML_NOENT: WARNING, external entity loaded! |
| 53 | disabled entity loader without LIBXML_NOENT: | 58 | disabled entity loader without LIBXML_NOENT: |
| 54 | --CLEAN-- | ||
| 55 | <?php | ||
| 56 | $dir = __DIR__; | ||
| 57 | unlink($dir . "/content.xml"); | ||
| 58 | unlink($dir . "/content.txt"); | ||
| 59 | ?> | ||
