[wp-hackers] Ajax calls and cookie within the admin
L'Autre Monde
autremonde75 at gmail.com
Mon Feb 23 19:06:28 GMT 2009
Hello,
I am trying to secure a plugin. I am wondering how to handle the cookie on the server side.
On the client side, I am performing this call :
jQuery.post("<?php echo $site_url; ?>/wp-admin/admin-ajax.php", {action:"my_ajax_call", 'cookie': encodeURIComponent(document.cookie), ajax_call_param:ajaxcall_param},
function(res)
{
...
}
One way to secure the call is to use the check_ajax_referer with nonce which work pretty fine. Now I would like to understand how to handle the cookie sent out to the server through Ajax. I have made some researches but I cannot find out any details on the cookie handling for ajax calls.
Cheers,
Olivier
More information about the wp-hackers
mailing list