Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A UTF-8 non-breakable space character (0xC2A0) breaks multiple files #390

@arkamax2k

Description

@arkamax2k

An example from lib/net/authorize/api/contract/v1/ANetApiResponseType.php:134

        if(is_array($data) || is_object($data)) {

looks benign, but:

$ printf "if(is_array($data) || is_object($data)) {" | xxd
00000000: 6966 2869 735f 6172 7261 7928 2920 7c7c  if(is_array() ||
00000010: c2a0 6973 5f6f 626a 6563 7428 2929 207b  ..is_object()) {

Note c2a0 before is_object - this breaks PHP 7.3 parser (maybe others too), and execution fails with a Fatal Error on " is_object()" not being found, since 0xc2a0 is deemed a part of the function name.

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