<commit_before><?php
    include "connection.php";

    $email = "";
    $code = "";

    require_once('captcha/recaptchalib.php');
    $resp = recaptcha_check_answer ($recaptcha_private_key,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

    if (!$resp->is_valid) 
    {
        die ("The reCAPTCHA wasn't entered correctly. Use the BACK button in your navigator.");
    }

 
    if(isset($_POST["email"]) && isset($_POST["code"]) && isset($_POST["password1"]) && isset($_POST["password2"]))
    {
        $password1 = $_POST["password1"];
        $password2 = $_POST["password2"];

        if ($password1 != $password2) 
        {
            die ("The passwords are different! Use the BACK button in your navigator.");
        }

        $email = $_POST["email"];
        $code  = $_POST["code"];

        $sql = "UPDATE Users SET password = MD5(CONCAT('<PASSWORD>', salt)) WHERE email = '$email' AND confirmationCode = '$code'";
        $exe = mysql_query( $sql, $myrmconn) or print(mysql_error());

        //echo $sql;

        if(mysql_affected_rows()==1)
        {
            echo "Password changed!";
            $sql = "UPDATE Users SET confirmationCode = 'MD5(RAND())' WHERE email = '$email'";
            $exe = mysql_query( $sql, $myrmconn) or print(mysql_error());
        }
        else
            echo "Error changing password! Request a new 'forgot password' in login.";<commit_msg>email is also confirmed after forgot password<commit_after><?php
    include "connection.php";

    $email = "";
    $code = "";

    require_once('captcha/recaptchalib.php');
    $resp = recaptcha_check_answer ($recaptcha_private_key,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

    if (!$resp->is_valid) 
    {
        die ("The reCAPTCHA wasn't entered correctly. Use the BACK button in your navigator.");
    }

 
    if(isset($_POST["email"]) && isset($_POST["code"]) && isset($_POST["password1"]) && isset($_POST["password2"]))
    {
        $password1 = $_POST["password1"];
        $password2 = $_POST["password2"];

        if ($password1 != $password2) 
        {
            die ("The passwords are different! Use the BACK button in your navigator.");
        }

        $email = $_POST["email"];
        $code  = $_POST["code"];

        $sql = "UPDATE Users SET password = MD5(CONCAT('$<PASSWORD>', salt)) WHERE email = '$email' AND confirmationCode = '$code'";
        $exe = mysql_query( $sql, $myrmconn) or print(mysql_error());

        //echo $sql;

        if(mysql_affected_rows()==1)
        {
            echo "Password changed!";
            $sql = "UPDATE Users SET checkedEmail = '1', confirmationCode = 'MD5(RAND())' WHERE email = '$email'";
            $exe = mysql_query( $sql, $myrmconn) or print(mysql_error());
        }
        else
            echo "Error changing password! Request a new 'forgot password' in login.";
{'fraction_non_alphanumeric': 0.15128449096098953, 'fraction_numerical': 0.007294640025372661, 'mean_word_length': 2.2922755741127347, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3727165', 'n_tokens_mistral': 937, 'n_tokens_neox': 882, 'n_words': 219}