Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
xml /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
bug25666.phpt
865
B
-rw-rw-r--
2022-10-31 11:36
bug26528.phpt
576
B
-rw-rw-r--
2022-10-31 11:36
bug26614.phpt
2.18
KB
-rw-rw-r--
2022-10-31 11:36
bug26614_libxml.phpt
2.19
KB
-rw-rw-r--
2022-10-31 11:36
bug27908.phpt
421
B
-rw-rw-r--
2022-10-31 11:36
bug30266.phpt
933
B
-rw-rw-r--
2022-10-31 11:36
bug30875.phpt
683
B
-rw-rw-r--
2022-10-31 11:36
bug32001.phpt
11.93
KB
-rw-rw-r--
2022-10-31 11:36
bug32001b.phpt
5.21
KB
-rw-rw-r--
2022-10-31 11:36
bug35447.phpt
1.12
KB
-rw-rw-r--
2022-10-31 11:36
bug46699.phpt
845
B
-rw-rw-r--
2022-10-31 11:36
bug50576.phpt
2.39
KB
-rw-rw-r--
2022-10-31 11:36
bug65236.phpt
324
B
-rw-rw-r--
2022-10-31 11:36
bug70962.phpt
844
B
-rw-rw-r--
2022-10-31 11:36
bug71592.phpt
760
B
-rw-rw-r--
2022-10-31 11:36
bug72085.phpt
2.44
KB
-rw-rw-r--
2022-10-31 11:36
bug72099.phpt
294
B
-rw-rw-r--
2022-10-31 11:36
bug72714.phpt
836
B
-rw-rw-r--
2022-10-31 11:36
bug73135.phpt
870
B
-rw-rw-r--
2022-10-31 11:36
bug79922.phpt
396
B
-rw-rw-r--
2022-10-31 11:36
bug81351.phpt
1.04
KB
-rw-rw-r--
2022-10-31 11:36
inc.ent
65
B
-rw-rw-r--
2022-10-31 11:36
skipif.inc
237
B
-rw-rw-r--
2022-10-31 11:36
xml001.phpt
2.55
KB
-rw-rw-r--
2022-10-31 11:36
xml002.phpt
2.7
KB
-rw-rw-r--
2022-10-31 11:36
xml003.phpt
2.66
KB
-rw-rw-r--
2022-10-31 11:36
xml004.phpt
1.08
KB
-rw-rw-r--
2022-10-31 11:36
xml007.phpt
948
B
-rw-rw-r--
2022-10-31 11:36
xml009.phpt
861
B
-rw-rw-r--
2022-10-31 11:36
xml010.phpt
923
B
-rw-rw-r--
2022-10-31 11:36
xml011.phpt
1.31
KB
-rw-rw-r--
2022-10-31 11:36
xml_closures_001.phpt
757
B
-rw-rw-r--
2022-10-31 11:36
xml_parse_into_struct_variation.phpt
2.09
KB
-rw-rw-r--
2022-10-31 11:36
xml_parser_get_option_variation3.phpt
781
B
-rw-rw-r--
2022-10-31 11:36
xml_parser_set_option_basic.phpt
1.62
KB
-rw-rw-r--
2022-10-31 11:36
xml_parser_set_option_variation3.phpt
2.53
KB
-rw-rw-r--
2022-10-31 11:36
xml_parser_set_option_variation4.phpt
613
B
-rw-rw-r--
2022-10-31 11:36
xml_set_notation_decl_handler_basic.phpt
2.81
KB
-rw-rw-r--
2022-10-31 11:36
xml_set_processing_instruction_handler_basic.phpt
1.22
KB
-rw-rw-r--
2022-10-31 11:36
xml_set_start_namespace_decl_handler_basic.phpt
1.52
KB
-rw-rw-r--
2022-10-31 11:36
xmltest.xml
367
B
-rw-rw-r--
2022-10-31 11:36
Save
Rename
--TEST-- Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect), using EUC-JP, Shift_JIS, GB2312 --SKIPIF-- <?php require_once("skipif.inc"); if (!extension_loaded('iconv')) die ("skip iconv extension not available"); foreach(array('EUC-JP', 'Shift_JISP', 'GB2312') as $encoding) { if (@xml_parser_create($encoding) === false) die("skip libxml2 does not support $encoding encoding"); } ?> --FILE-- <?php class testcase { private $encoding; private $bom; private $prologue; private $tags; private $chunk_size; function testcase($enc, $chunk_size = 0, $bom = 0, $omit_prologue = 0) { $this->encoding = $enc; $this->chunk_size = $chunk_size; $this->bom = $bom; $this->prologue = !$omit_prologue; $this->tags = array(); } function start_element($parser, $name, $attrs) { $attrs = array_map('bin2hex', $attrs); $this->tags[] = bin2hex($name).": ".implode(', ', $attrs); } function end_element($parser, $name) { } function run() { $data = ''; if ($this->prologue) { $canonical_name = preg_replace('/BE|LE/i', '', $this->encoding); $data .= "<?xml version=\"1.0\" encoding=\"$canonical_name\" ?>\n"; } $data .= <<<HERE <テスト:テスト1 xmlns:テスト="http://www.example.com/テスト/" テスト="テスト"> <テスト:テスト2 テスト="テスト"> <テスト:テスト3> test! </テスト:テスト3> </テスト:テスト2> </テスト:テスト1> HERE; $data = iconv("UTF-8", $this->encoding, $data); $parser = xml_parser_create(NULL); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_set_element_handler($parser, "start_element", "end_element"); xml_set_object($parser, $this); if ($this->chunk_size == 0) { $success = @xml_parse($parser, $data, true); } else { for ($offset = 0; $offset < strlen($data); $offset += $this->chunk_size) { $success = @xml_parse($parser, substr($data, $offset, $this->chunk_size), false); if (!$success) { break; } } if ($success) { $success = @xml_parse($parser, "", true); } } echo "Encoding: $this->encoding\n"; echo "XML Prologue: ".($this->prologue ? 'present': 'not present'), "\n"; echo "Chunk size: ".($this->chunk_size ? "$this->chunk_size byte(s)\n": "all data at once\n"); echo "BOM: ".($this->bom ? 'prepended': 'not prepended'), "\n"; if ($success) { var_dump($this->tags); } else { echo "[Error] ", xml_error_string(xml_get_error_code($parser)), "\n"; } } } $suite = array( new testcase("EUC-JP" , 0), new testcase("EUC-JP" , 1), new testcase("Shift_JIS", 0), new testcase("Shift_JIS", 1), new testcase("GB2312", 0), new testcase("GB2312", 1), ); if (XML_SAX_IMPL == 'libxml') { echo "libxml2 Version => " . LIBXML_DOTTED_VERSION. "\n"; } else { echo "libxml2 Version => NONE\n"; } foreach ($suite as $testcase) { $testcase->run(); } ?> --EXPECTF-- libxml2 Version => %s Encoding: EUC-JP XML Prologue: present Chunk size: all data at once BOM: not prepended array(3) { [0]=> string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" [1]=> string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" [2]=> string(42) "e38386e382b9e383883ae38386e382b9e3838833: " } Encoding: EUC-JP XML Prologue: present Chunk size: 1 byte(s) BOM: not prepended array(3) { [0]=> string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" [1]=> string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" [2]=> string(42) "e38386e382b9e383883ae38386e382b9e3838833: " } Encoding: Shift_JIS XML Prologue: present Chunk size: all data at once BOM: not prepended array(3) { [0]=> string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" [1]=> string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" [2]=> string(42) "e38386e382b9e383883ae38386e382b9e3838833: " } Encoding: Shift_JIS XML Prologue: present Chunk size: 1 byte(s) BOM: not prepended array(3) { [0]=> string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" [1]=> string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" [2]=> string(42) "e38386e382b9e383883ae38386e382b9e3838833: " } Encoding: GB2312 XML Prologue: present Chunk size: all data at once BOM: not prepended array(3) { [0]=> string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" [1]=> string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" [2]=> string(42) "e38386e382b9e383883ae38386e382b9e3838833: " } Encoding: GB2312 XML Prologue: present Chunk size: 1 byte(s) BOM: not prepended array(3) { [0]=> string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" [1]=> string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" [2]=> string(42) "e38386e382b9e383883ae38386e382b9e3838833: " }