Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Bug #81708 (UAF due to php_filter_float() failing for ints) --EXTENSIONS-- filter..

Decoded Output download

--TEST--
Bug #81708 (UAF due to php_filter_float() failing for ints)
--EXTENSIONS--
filter
--INI--
opcache.enable_cli=0
--FILE--
<?php
$input = "+" . str_repeat("1", 2); // avoid string interning
filter_var(
    $input,
    FILTER_VALIDATE_FLOAT,
    ["options" => ['min_range' => -1, 'max_range' => 1]]
);
var_dump($input);
?>
--EXPECT--
string(3) "+11"

Did this file decode correctly?

Original Code

--TEST--
Bug #81708 (UAF due to php_filter_float() failing for ints)
--EXTENSIONS--
filter
--INI--
opcache.enable_cli=0
--FILE--
<?php
$input = "+" . str_repeat("1", 2); // avoid string interning
filter_var(
    $input,
    FILTER_VALIDATE_FLOAT,
    ["options" => ['min_range' => -1, 'max_range' => 1]]
);
var_dump($input);
?>
--EXPECT--
string(3) "+11"

Function Calls

None

Variables

None

Stats

MD5 96b5544eac84a6ed1bd170fd9953b86b
Eval Count 0
Decode Time 89 ms