[wp-cvs] wordpress wp-pass.php,1.5,1.6
Matthew Mullenweg
saxmatt at users.sourceforge.net
Sun Oct 10 17:46:52 UTC 2004
Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8282
Modified Files:
wp-pass.php
Log Message:
Cookie path fix: http://wordpress.org/support/3/14408
Index: wp-pass.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-pass.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** wp-pass.php 11 Jun 2004 08:02:39 -0000 1.5
--- wp-pass.php 10 Oct 2004 17:46:50 -0000 1.6
***************
*** 1,10 ****
<?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);
header('Location: ' . $_SERVER['HTTP_REFERER']);
--- 1,11 ----
<?php
require(dirname(__FILE__) . '/wp-config.php');
!
! 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']);
More information about the cvs
mailing list