wahabmirjan / wp-simple-nonce

A very simple NONCE for WordPress developers.
GNU General Public License v2.0
37 stars 10 forks source link

getting back valid nonce when sending it "blank' info #8

Closed dynamitemedia closed 1 year ago

dynamitemedia commented 3 years ago

odd thing so i just called it like this

$result = WPSimpleNonce::checkNonce($name,$value);
var_dump($result);

and i get this as a result bool(true)

but there is NO info for $name or $value but it is still coming back as true

im calling this on another page where the form was submitted aka: form_data.php

<?php
$vidID="1tyr234446hfr";

$myNonce = WPSimpleNonce::createNonce('vid_' .$vidID);
extract($myNonce);
echo $name . "<br><br>"; 
echo $value . "<br><br>";

?>
<input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>" />

then on the other page im using is as this:

        ```
            $name = $_REQUEST['$name'];
    $value = $_REQUEST['$value'];
    $result = WPSimpleNonce::checkNonce($name,$value);
            var_dump($result);

    // we check that nonce is valid
    if (boolval( $result )  =='1'){

        echo "this Nonce is Valid";

    } else {
        echo "this Nonce is inValid";
    }  // closed boolean check


and yet it is coming back valid while testing  WITHOUT pass any of the variables
wahabmirjan commented 1 year ago

Could not reproduce.