| <?php |
| /******************************************************************************* |
| * Copyright (c) 2012-2015 Eclipse Foundation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Denis Roy (Eclipse Foundation)- initial API and implementation |
| * Christopher Guindon (Eclipse Foundation) - Bug 432355 - Update l&f of the Eclipse site login |
| *******************************************************************************/ |
| header('Content-Type: text/html; charset=utf-8'); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); |
| |
| $App = new App(); |
| $Nav = new Nav(); |
| $Menu = new Menu(); |
| |
| $App->preventCaching(); |
| $Session = $App->useSession(); |
| # Bug 443883 - [site_login] Password change should invalidate all active sessions |
| if ($Session->isLoggedIn()) { |
| $Session->destroy(TRUE); |
| } |
| |
| $token = $App->getHTTPParameter("t"); |
| $p = $App->getHTTPParameter("p"); |
| $url_suffix = ""; |
| |
| // Password reset stage 2. |
| if ($p == 'p') { |
| $url_suffix = '&p=p'; |
| } |
| $stage = $App->getHTTPParameter("stage"); |
| |
| $page = 'password_recovery'; |
| if ($stage == 'confirm'){ |
| $page = 'index'; |
| $url_suffix = '&stage=confirm'; |
| } |
| |
| $token = preg_replace("/[^a-zA-Z0-9]/", "", $token); |
| header("Location: " . $page . ".php?t=" . $token . $url_suffix, 302); |