From 206a3caef783724a41204cec64321d0df1977526 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Wed, 27 Aug 2008 16:43:30 +0000 Subject: [PATCH] Access without login - accept ?username= git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@459 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- auth.inc.php | 6 +++++- todo.txt | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/auth.inc.php b/auth.inc.php index 592b23ef..92a177a8 100644 --- a/auth.inc.php +++ b/auth.inc.php @@ -70,8 +70,12 @@ function auth_error() { page_footer("auth"); } -$username = $_SESSION["usernames"][$_GET["server"]]; +$username = &$_SESSION["usernames"][$_GET["server"]]; +if (!isset($username)) { + $username = $_GET["username"]; +} if (!isset($username) || !$mysql->connect($_GET["server"], $username, $_SESSION["passwords"][$_GET["server"]])) { auth_error(); exit; } +unset($username); diff --git a/todo.txt b/todo.txt index 334558b9..669d32d1 100644 --- a/todo.txt +++ b/todo.txt @@ -9,7 +9,6 @@ Bulk update - leave original, set to value, set to NULL Save uploaded files after error to session variable instead of hidden field Transactions in export Compress export and import -Access without login - accept $_GET ? Query print ? Execution time in sql.inc.php ? Save token also to cookie - for session expiration and login in other window