Make WordPress Core


Ignore:
Timestamp:
03/14/2007 11:10:57 PM (19 years ago)
Author:
markjaquith
Message:

nonce-protect comments by users with unfiltered_html cap to prevent xsrf/xss. fixes #3973 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r5032 r5039  
    10011001}
    10021002
    1003 function wp_nonce_field($action = -1) {
    1004     echo '<input type="hidden" name="_wpnonce" value="' . wp_create_nonce($action) . '" />';
    1005     wp_referer_field();
     1003function wp_nonce_field($action = -1, $name = "_wpnonce", $referer = true) {
     1004    $name = attribute_escape($name);
     1005    echo '<input type="hidden" name="' . $name . '" value="' . wp_create_nonce($action) . '" />';
     1006    if ( $referer )
     1007        wp_referer_field();
    10061008}
    10071009
Note: See TracChangeset for help on using the changeset viewer.