Make WordPress Core

Ticket #43667: signup_nonce_check.patch

File signup_nonce_check.patch, 805 bytes (added by herregroen, 6 years ago)
  • src/wp-includes/ms-functions.php

    diff --git src/wp-includes/ms-functions.php src/wp-includes/ms-functions.php
    index ebc699436d..244a089317 100644
    function signup_nonce_check( $result ) { 
    21932193                return $result;
    21942194        }
    21952195
    2196         if ( wp_create_nonce( 'signup_form_' . $_POST['signup_form_id'] ) != $_POST['_signup_form'] ) {
    2197                 wp_die( __( 'Please try again.' ) );
     2196        if ( ! wp_verify_nonce( $_POST['_signup_form'], 'signup_form_' . $_POST['signup_form_id'] ) ) {
     2197                /* translators: Error on nonce failure during multisite signup. 1: Opening anchor to registration form, 2: Closing anchor tag */
     2198                wp_die( printf( __( 'Unable to submit this form, please %1$stry again%2$s.' ), '<a href="' . wp_registration_url() . '">', '</a>' ) );
    21982199        }
    21992200
    22002201        return $result;