Cookie path fix: http://wordpress.org/support/3/14408
git-svn-id: http://svn.automattic.com/wordpress/trunk@1767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3c360863ae
commit
e4f041f289
13
wp-pass.php
13
wp-pass.php
|
@ -1,11 +1,12 @@
|
|||
<?php
|
||||
/*
|
||||
This is just a very simple script to set a cookie with a posted password and redirect back from whence the browser came.
|
||||
It doesn't need to connect to the DB, or do anything fancy at all. Yum.
|
||||
-- Matt
|
||||
*/
|
||||
require(dirname(__FILE__) . '/wp-config.php');
|
||||
setcookie('wp-postpass_'.$cookiehash, stripslashes($_POST['post_password']), time()+60*60*24*30);
|
||||
|
||||
if ( get_magic_quotes_gpc() )
|
||||
$_POST['post_password'] = stripslashes($_POST['post_password']);
|
||||
|
||||
// 10 days
|
||||
setcookie('wp-postpass_' . COOKIEHASH, $_POST['post_password'], time() + 864000, COOKIEPATH);
|
||||
|
||||
header('Location: ' . $_SERVER['HTTP_REFERER']);
|
||||
|
||||
?>
|
Loading…
Reference in New Issue