[wp-cvs] wordpress wp-login.php,1.53,1.54

Ryan Boren rboren at users.sourceforge.net
Thu Jan 20 04:56:26 GMT 2005


Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18201

Modified Files:
	wp-login.php 
Log Message:
wp_setcookie() and wp_clearcookie().  Set cookies for both siteurl and home if they are not the same.  Update cookies whenever home or siteurl change.

Index: wp-login.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-login.php,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** wp-login.php	5 Jan 2005 02:06:16 -0000	1.53
--- wp-login.php	20 Jan 2005 04:56:23 -0000	1.54
***************
*** 21,31 ****
  case 'logout':
  
!     setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH);
!     setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH);
  	header('Expires: Mon, 11 Jan 1984 05:00:00 GMT');
  	header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
  	header('Cache-Control: no-cache, must-revalidate, max-age=0');
  	header('Pragma: no-cache');
- 
  	header('Location: wp-login.php');
  	exit();
--- 21,29 ----
  case 'logout':
  
! 	wp_clearcookie();
  	header('Expires: Mon, 11 Jan 1984 05:00:00 GMT');
  	header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
  	header('Cache-Control: no-cache, must-revalidate, max-age=0');
  	header('Pragma: no-cache');
  	header('Location: wp-login.php');
  	exit();
***************
*** 135,141 ****
  		if ( wp_login($user_login, $user_pass, $using_cookie) ) {
  			if (! $using_cookie) {
! 				$user_pass = md5(md5($user_pass)); // Double hash the password in the cookie.
! 				setcookie('wordpressuser_'. COOKIEHASH, $user_login, time() + 31536000, COOKIEPATH);
! 				setcookie('wordpresspass_'. COOKIEHASH, $user_pass, time() + 31536000, COOKIEPATH);
  			}
  
--- 133,137 ----
  		if ( wp_login($user_login, $user_pass, $using_cookie) ) {
  			if (! $using_cookie) {
! 				wp_setcookie($user_login, $user_pass);
  			}
  



More information about the cvs mailing list