From 6ed9d98852a006aca4b001c41da12d9c07766b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Fr=C3=B6hlich?= Date: Mon, 1 Aug 2011 21:42:51 +0200 Subject: Changed proposed by Uli60, see https://bugs.cacert.org/view.php?id=910#c2226 --- www/index.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) mode change 100644 => 100755 www/index.php (limited to 'www') diff --git a/www/index.php b/www/index.php old mode 100644 new mode 100755 index fb215c6..3afe111 --- a/www/index.php +++ b/www/index.php @@ -628,6 +628,20 @@ if(!array_key_exists('signup',$_SESSION) || $_SESSION['signup']['year'] < 1900) $_SESSION['signup']['year'] = "19XX"; + if ($id == 8) + { + $protocol = $_SERVER['HTTPS'] ? 'https' : 'http'; + $newUrl = $protocol . '://wiki.cacert.org/Board'; + header('Location: '.$newUrl, true, 301); // 301 = Permanently Moved + } + + if ($id == 19) + { + $protocol = $_SERVER['HTTPS'] ? 'https' : 'http'; + $newUrl = $protocol . '://wiki.cacert.org/FAQ/Privileges'; + header('Location: '.$newUrl, true, 301); // 301 = Permanently Moved + } + showheader(_("Welcome to CAcert.org")); includeit($id); showfooter(); -- cgit v1.2.1 From e13e2a6c2b0fe95484bf2b5bfce8d24220b32ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=A4nzer?= Date: Sat, 10 Sep 2011 16:04:08 +0200 Subject: Source code taken from cacert-20110910.tar.bz2 --- www/index.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'www') diff --git a/www/index.php b/www/index.php index 7330877..a4c50fc 100644 --- a/www/index.php +++ b/www/index.php @@ -148,13 +148,16 @@ if($id == 4 && $_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname']) { - $query = "select * from `emailcerts` where `serial`='$_SERVER[SSL_CLIENT_M_SERIAL]' and `revoked`=0 and disablelogin=0 and - UNIX_TIMESTAMP(`expire`) - UNIX_TIMESTAMP() > 0"; - $res = mysql_query($query); - if(mysql_num_rows($res) > 0) + include_once("../includes/lib/general.php"); + $user_id = get_user_id_from_cert($_SERVER['SSL_CLIENT_M_SERIAL'], + $_SERVER['SSL_CLIENT_I_DN_CN']); + + if($user_id >= 0) { - $row = mysql_fetch_assoc($res); - $_SESSION['profile'] = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$row[memid]' and `deleted`=0 and `locked`=0")); + $_SESSION['profile'] = mysql_fetch_assoc(mysql_query( + "select * from `users` where + `id`='$user_id' and `deleted`=0 and `locked`=0")); + if($_SESSION['profile']['id'] != 0) { $_SESSION['profile']['loggedin'] = 1; -- cgit v1.2.1 From b04202b91ae74c1a36b3a876226b651d0fd844ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=A4nzer?= Date: Fri, 16 Sep 2011 05:01:50 +0200 Subject: bug 910: correct checkin errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Tänzer --- www/index.php | 7 ------- 1 file changed, 7 deletions(-) mode change 100755 => 100644 www/index.php (limited to 'www') diff --git a/www/index.php b/www/index.php old mode 100755 new mode 100644 index 3afe111..6390f2c --- a/www/index.php +++ b/www/index.php @@ -635,13 +635,6 @@ header('Location: '.$newUrl, true, 301); // 301 = Permanently Moved } - if ($id == 19) - { - $protocol = $_SERVER['HTTPS'] ? 'https' : 'http'; - $newUrl = $protocol . '://wiki.cacert.org/FAQ/Privileges'; - header('Location: '.$newUrl, true, 301); // 301 = Permanently Moved - } - showheader(_("Welcome to CAcert.org")); includeit($id); showfooter(); -- cgit v1.2.1