git.cweiske.de
/
phorkie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4293cbe
)
CLEAN: use fullUrl when possible
author
Justin J. Novack
<jnovack@gmail.com>
Tue, 18 Sep 2012 14:08:33 +0000
(10:08 -0400)
committer
Justin J. Novack
<jnovack@gmail.com>
Tue, 18 Sep 2012 14:08:33 +0000
(10:08 -0400)
www/login.php
patch
|
blob
|
history
diff --git
a/www/login.php
b/www/login.php
index a2cf97c211ebcaa69fc5fe5fa85b927ffa9da9c6..9c1b136d8fdcdc306d1d2fecb2a652cf376d5922 100644
(file)
--- a/
www/login.php
+++ b/
www/login.php
@@
-77,7
+77,7
@@
if (isset($_POST['openid_url'])) {
$authRequest->addExtension($ax);
$url = $authRequest->getAuthorizeURL();
$authRequest->addExtension($ax);
$url = $authRequest->getAuthorizeURL();
-
+
header("Location: $url");
exit;
header("Location: $url");
exit;
@@
-116,7
+116,7
@@
try {
} catch (OpenID_Exception $e) {
$status = "<tr><td>Status:</td><td><font color='red'>EXCEPTION!";
$status .= " ({$e->getMessage()} : {$e->getCode()})</font></td></tr>";
} catch (OpenID_Exception $e) {
$status = "<tr><td>Status:</td><td><font color='red'>EXCEPTION!";
$status .= " ({$e->getMessage()} : {$e->getCode()})</font></td></tr>";
-
}
+}
$openid = $message->getArrayFormat();
$openid = $message->getArrayFormat();
@@
-149,7
+149,11
@@
$name = isset($openid['openid.sreg.fullname']) && !isset($name)
$_SESSION['name'] = isset($name) ? $name : $_SERVER['REMOTE_ADDR'];
$_SESSION['identity'] = $openid['openid.identity'];
$_SESSION['name'] = isset($name) ? $name : $_SERVER['REMOTE_ADDR'];
$_SESSION['identity'] = $openid['openid.identity'];
-$redirect = 'http://' . $_SERVER['HTTP_HOST'] . $_SESSION['REQUEST_URI'];
+if (isset($_SESSION['REQUEST_URI'])) {
+ $redirect = Tools::fullUrl($_SESSION['REQUEST_URI']);
+} else {
+ $redirect = Tools::fullUrl('/');
+}
header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL));
exit;
?>
header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL));
exit;
?>