From 5e7f6578979b4f696d271baffb3543f79e88dca8 Mon Sep 17 00:00:00 2001 From: paulr Date: Thu, 9 Dec 2010 03:00:02 +1100 Subject: [PATCH] fixed the qrcode creation dialog --- authserver/authd/authd.php | 5 +++-- authserver/www/index.php | 16 ++++++++++------ authserver/www/user_actions.php | 4 ++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/authserver/authd/authd.php b/authserver/authd/authd.php index df57ed1..edd750e 100644 --- a/authserver/authd/authd.php +++ b/authserver/authd/authd.php @@ -210,9 +210,10 @@ if($pid == -1) { $myga->setUser($username, $tokentype, "", $hexkey); $url = $myga->createUrl($username); + echo "Url was: $url\n"; if(!file_exists("$BASE_DIR/authserver/authd/otks")) mkdir("$BASE_DIR/authserver/authd/otks"); $otk = generateRandomString(); - system("qrencode -o $BASE_DIR/authserver/authd/otks/$otk.png $url"); + system("qrencode -o $BASE_DIR/authserver/authd/otks/$otk.png '$url'"); $sql = "update users set users_otk='$otk' where users_username='$username'"; $dbo = getDatabase(); @@ -380,7 +381,7 @@ if($pid == -1) { break; case MSG_GET_USERS: // TODO this needs to be better - $sql = "select * from users"; + $sql = "select * from users order by users_username"; $dbo = getDatabase(); $res = $dbo->query($sql); diff --git a/authserver/www/index.php b/authserver/www/index.php index dce9260..cff7fa3 100644 --- a/authserver/www/index.php +++ b/authserver/www/index.php @@ -20,9 +20,10 @@ if(isset($_REQUEST["gettoken"])) { if($otk == "") { ?> -Hello , we're sorry, but your One Time Key has already been picked up or you -dont currently have a token. If you believe this in error, please contact the site admin immediately -as it could mean your key has been compromised. +Hello , we're sorry, but your One Time Key has
+already been picked up or you dont currently have a token. If you believe
+this in error, please contact the site admin immediately as it could mean
+your key has been compromised.
Hello , welcome to the One Time Key retreival site. Before we present
-your key, you must have your phone ready to accept it as the key will only be presented once.
+your key, you must have your phone ready to accept it as the key can only be presented once.
If your phone is not ready to accept the key, the key needs to be regenerated, so only proceed
if you phone is on, you have clicked on "scan account barcode" and the phone is ready to
-scan, please proceed.
+scan the code.

If you are ready to proceed, click here. @@ -92,7 +93,10 @@ Token Code:
} else { ?> -Hi user +Welcome, you have successfully logged into the
+user site, but there is no content here to view.
+Later, this site will be where you might resync your
+token or change pin codes and the like

Logout diff --git a/authserver/www/user_actions.php b/authserver/www/user_actions.php index 35b1f8a..28852cf 100644 --- a/authserver/www/user_actions.php +++ b/authserver/www/user_actions.php @@ -37,7 +37,7 @@ if(isset($_REQUEST["action"])) { header("Location: index.php"); } else { error_log("login failed, $username, $token"); - header("Location: index.php?message=loginfail"); + header("Location: index.php?error=".urlencode("Login Failed")); } break; case "logout": @@ -49,4 +49,4 @@ if(isset($_REQUEST["action"])) { } } -?> \ No newline at end of file +?> -- 1.7.0.4