Changeset 3660 for trunk/wp-includes/pluggable-functions.php
- Timestamp:
- 03/29/2006 01:51:55 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pluggable-functions.php
r3566 r3660 235 235 die(__('Sorry, you need to <a href="http://codex.wordpress.org/Enable_Sending_Referrers">enable sending referrers</a> for this feature to work.')); 236 236 do_action('check_admin_referer'); 237 } 238 endif; 239 240 if ( !function_exists('check_ajax_referer') ) : 241 function check_ajax_referer() { 242 $cookie = explode(';', urldecode(empty($_POST['cookie']) ? $_GET['cookie'] : $_POST['cookie'])); // AJAX scripts must pass cookie=document.cookie 243 foreach ( $cookie as $tasty ) { 244 if ( false !== strpos($tasty, USER_COOKIE) ) 245 $user = substr(strstr($tasty, '='), 1); 246 if ( false !== strpos($tasty, PASS_COOKIE) ) 247 $pass = substr(strstr($tasty, '='), 1); 248 } 249 if ( !wp_login( $user, $pass, true ) ) 250 die('-1'); 251 do_action('check_ajax_referer'); 237 252 } 238 253 endif;
Note: See TracChangeset
for help on using the changeset viewer.