Ticket #2800: 2800.2.diff
| File 2800.2.diff, 1.3 KB (added by , 20 years ago) |
|---|
-
functions.php
1049 1049 1050 1050 function wp_nonce_field($action = -1) { 1051 1051 echo '<input type="hidden" name="_wpnonce" value="' . wp_create_nonce($action) . '" />'; 1052 wp_referer_field(); 1052 1053 } 1053 1054 1055 function wp_referer_field() { 1056 echo '<input type="hidden" name="_wphttp_referer" value="'. wp_specialchars(stripslashes($_SERVER['REQUEST_URI'])) . '" />'; 1057 } 1058 1054 1059 function wp_mkdir_p($target) { 1055 1060 // from php.net/mkdir user contributed notes 1056 1061 if (file_exists($target)) { -
pluggable-functions.php
231 231 function check_admin_referer($action = -1) { 232 232 global $pagenow, $menu, $submenu, $parent_file, $submenu_file;; 233 233 $adminurl = strtolower(get_settings('siteurl')).'/wp-admin'; 234 $referer = strtolower($_SERVER['HTTP_REFERER']);234 $referer = (empty($_POST['_wphttp_referer'])) ? strtolower($_SERVER['HTTP_REFERER']) : strtolower($_POST['wp_http_referer']); 235 235 if ( !wp_verify_nonce($_REQUEST['_wpnonce'], $action) && 236 236 !(-1 == $action && strstr($referer, $adminurl)) ) { 237 237 if ( $referer )