|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-31 13:51 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 03:00:01 2025 UTC |
Description: ------------ Filter-0.9.4 stateOH1: /* state "octal or hex" */ if (*p != '0') { goto stateI1; } p++; if (*p == 'x') { <===HERE: not test 'X' if (allow_hex) { p++; goto stateH1; } else { goto stateE; } stateH1: /* state "hex 1" */ ctx_type = TYPE_HEX; if ((*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f')) { <<<===HERE: not test 'A' - 'F' ctx_value *= 16; if (*p >= '0' && *p <= '9') { ctx_value += ((*p) - '0'); } if (*p >= 'a' && *p <= 'f') { ctx_value += 10 + ((*p) - 'a'); } p++; goto stateH1; } Reproduce code: --------------- $source = INPUT_GET; $name = $_GET['foo']; $option = array('flags' => FILTER_FLAG_ALLOW_HEX); $ret = input_get($source, $name, parent::FILTER_VALIDATE_INT, $options); in $_GET['foo'] == 0XF; or 0xF or 0Xf;