Make WordPress Core


Ignore:
Timestamp:
01/24/2008 09:19:42 PM (17 years ago)
Author:
ryan
Message:

check_ajax_referer() should look for *only* the auth_cookie, not others that look like they match. Autosave should know that an ajax response of -1 or 0 is a failure. Props mdawaffe

File:
1 edited

Legend:

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

    r6648 r6649  
    662662        $cookie = explode('; ', urldecode(empty($_POST['cookie']) ? $_GET['cookie'] : $_POST['cookie'])); // AJAX scripts must pass cookie=document.cookie
    663663        foreach ( $cookie as $tasty ) {
    664             if ( false !== strpos($tasty, AUTH_COOKIE) )
     664            if ( false !== strpos($tasty, AUTH_COOKIE . '=') ) {
    665665                $auth_cookie = substr(strstr($tasty, '='), 1);
     666                break;
     667            }
    666668        }
    667669
Note: See TracChangeset for help on using the changeset viewer.