[wp-cvs] wordpress/wp-admin auth.php, 1.8, 1.9 link-manager.php,
1.38, 1.39 profile.php, 1.30, 1.31
Matthew Mullenweg
saxmatt at users.sourceforge.net
Sun Oct 10 18:02:31 UTC 2004
- Previous message: [wp-cvs] wordpress wp-pass.php,1.5,1.6
- Next message: [wp-cvs]
wordpress wp-comments-popup.php, 1.16, 1.17 wp-comments.php,
1.25, 1.26 wp-login.php, 1.39, 1.40 wp-settings.php, 1.56, 1.57
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11071/wp-admin
Modified Files:
auth.php link-manager.php profile.php
Log Message:
Move to cookiehash define, use wp_login() function for auth.php.
Index: link-manager.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/link-manager.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** link-manager.php 5 Sep 2004 00:24:26 -0000 1.38
--- link-manager.php 10 Oct 2004 18:02:28 -0000 1.39
***************
*** 74,79 ****
}
! $links_show_cat_id = $_COOKIE['links_show_cat_id_' . $cookiehash];
! $links_show_order = $_COOKIE['links_show_order_' . $cookiehash];
if ('' != $_POST['assign']) $action = 'assign';
--- 74,79 ----
}
! $links_show_cat_id = $_COOKIE['links_show_cat_id_' . COOKIEHASH];
! $links_show_order = $_COOKIE['links_show_order_' . COOKIEHASH];
if ('' != $_POST['assign']) $action = 'assign';
***************
*** 270,274 ****
WHERE link_id=$link_id");
} // end if save
! setcookie('links_show_cat_id_' . $cookiehash, $links_show_cat_id, time()+600);
header('Location: ' . $this_file);
break;
--- 270,274 ----
WHERE link_id=$link_id");
} // end if save
! setcookie('links_show_cat_id_' . COOKIEHASH, $links_show_cat_id, time()+600);
header('Location: ' . $this_file);
break;
***************
*** 297,301 ****
}
$links_show_cat_id = $cat_id;
! setcookie("links_show_cat_id_".$cookiehash, $links_show_cat_id, time()+600);
header('Location: '.$this_file);
break;
--- 297,301 ----
}
$links_show_cat_id = $cat_id;
! setcookie('links_show_cat_id_' . COOKIEHASH, $links_show_cat_id, time()+600);
header('Location: '.$this_file);
break;
***************
*** 568,573 ****
$links_show_order = $order_by;
! setcookie('links_show_cat_id_'.$cookiehash, $links_show_cat_id, time()+600);
! setcookie('links_show_order_'.$cookiehash, $links_show_order, time()+600);
$standalone=0;
include_once ("./admin-header.php");
--- 568,573 ----
$links_show_order = $order_by;
! setcookie('links_show_cat_id_' . COOKIEHASH, $links_show_cat_id, time()+600);
! setcookie('links_show_order_' . COOKIEHASH, $links_show_order, time()+600);
$standalone=0;
include_once ("./admin-header.php");
Index: auth.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/auth.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** auth.php 15 Jun 2004 23:24:35 -0000 1.8
--- auth.php 10 Oct 2004 18:02:28 -0000 1.9
***************
*** 1,47 ****
<?php
-
require_once('../wp-config.php');
! /* Checking login & pass in the database */
! function veriflog() {
! global $cookiehash;
! global $wpdb;
!
! if (!empty($_COOKIE['wordpressuser_' . $cookiehash])) {
! $user_login = $_COOKIE['wordpressuser_' . $cookiehash];
! $user_pass_md5 = $_COOKIE['wordpresspass_' . $cookiehash];
! } else {
! return false;
! }
!
! if ('' == $user_login)
! return false;
! if (!$user_pass_md5)
! return false;
!
! $login = $wpdb->get_row("SELECT user_login, user_pass FROM $wpdb->users WHERE user_login = '$user_login'");
!
! if (!$login) {
! return false;
!
! } else {
! if ($login->user_login == $user_login && md5($login->user_pass) == $user_pass_md5) {
! return true;
! } else {
! return false;
! }
! }
! }
!
! if ( !veriflog() ) {
header('Expires: Wed, 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');
header('Pragma: no-cache');
! if (!empty($_COOKIE['wordpressuser_' . $cookiehash])) {
! $error= __("<strong>Error</strong>: wrong login or password.");
! }
! $redir = 'Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']);
! header($redir);
exit();
}
--- 1,12 ----
<?php
require_once('../wp-config.php');
! if ( !empty($_COOKIE['wordpressuser_' . COOKIEHASH]) && !wp_login($_COOKIE['wordpressuser_' . COOKIEHASH], $_COOKIE['wordpresspass_' . COOKIEHASH) ) {
header('Expires: Wed, 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');
header('Pragma: no-cache');
!
! header('Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']);
exit();
}
Index: profile.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/profile.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** profile.php 5 Sep 2004 00:24:27 -0000 1.30
--- profile.php 10 Oct 2004 18:02:28 -0000 1.31
***************
*** 80,85 ****
$newuser_pass = $_POST["pass1"];
$updatepassword = "user_pass=MD5('$newuser_pass'), ";
! setcookie('wordpresspass_'.$cookiehash, " ", time() - 31536000, COOKIEPATH);
! setcookie('wordpresspass_'.$cookiehash, md5(md5($newuser_pass)), time() + 31536000, COOKIEPATH);
}
--- 80,85 ----
$newuser_pass = $_POST["pass1"];
$updatepassword = "user_pass=MD5('$newuser_pass'), ";
! setcookie('wordpresspass_' . COOKIEHASH, " ", time() - 31536000, COOKIEPATH);
! setcookie('wordpresspass_' . COOKIEHASH, md5(md5($newuser_pass)), time() + 31536000, COOKIEPATH);
}
- Previous message: [wp-cvs] wordpress wp-pass.php,1.5,1.6
- Next message: [wp-cvs]
wordpress wp-comments-popup.php, 1.16, 1.17 wp-comments.php,
1.25, 1.26 wp-login.php, 1.39, 1.40 wp-settings.php, 1.56, 1.57
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list