Skip to content

Undefined index: errors in UriString.php on line 455 & other errors #21

@ntzm

Description

@ntzm

Bug Report

Information Description
Version 6.0.1
PHP version 7.4.1
OS Platform Arch Linux

Summary

Standalone code, or other way to reproduce the problem

<?php

require __DIR__ . '/vendor/autoload.php';

\League\Uri\Uri::createFromString('//:�@�����������������������������������������������������������������������������������������/');

Expected result

Parse error

Actual result

Throws:

PHP Notice:  Undefined index: errors in /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php on line 455

Notice: Undefined index: errors in /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php on line 455
PHP Notice:  Undefined index: errors in /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php on line 456

Notice: Undefined index: errors in /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php on line 456
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to League\Uri\UriString::getIDNAErrors() must be of the type int, null given, called in /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php on line 456 and defined in /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php:477
Stack trace:
#0 /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php(456): League\Uri\UriString::getIDNAErrors(NULL)
thephpleague/uri#1 /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php(390): League\Uri\UriString::filterRegisteredName('\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD...')
thephpleague/uri#2 /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php(351): League\Uri\UriString::filterHost('\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD...')
thephpleague/uri#3 /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php(314): League\Uri\UriString::parseAuthority(':\xEF\xBF\xBD@\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF...')
thephpleague/uri#4 /home/nat/Code/personal/fuzzer-te in /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php on line 477

Fatal error: Uncaught TypeError: Argument 1 passed to League\Uri\UriString::getIDNAErrors() must be of the type int, null given, called in /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php on line 456 and defined in /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php:477
Stack trace:
#0 /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php(456): League\Uri\UriString::getIDNAErrors(NULL)
thephpleague/uri#1 /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php(390): League\Uri\UriString::filterRegisteredName('\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD...')
thephpleague/uri#2 /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php(351): League\Uri\UriString::filterHost('\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD...')
thephpleague/uri#3 /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php(314): League\Uri\UriString::parseAuthority(':\xEF\xBF\xBD@\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF...')
thephpleague/uri#4 /home/nat/Code/personal/fuzzer-te in /home/nat/Code/personal/fuzzer-test/vendor/league/uri/src/UriString.php on line 477

Found with https://github.com/nikic/PHP-Fuzzer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions