aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-14 21:29:44 -0700
committerfriendica <info@friendica.com>2012-03-14 21:29:44 -0700
commit93a8907f435e1b6ca55fa816ffb81b47a018db03 (patch)
treec915ac93219961a889c1d04e8df8352193629988
parent110e8f29197e0824d555b82c05c31f36b87ab7ae (diff)
downloadvolse-hubzilla-93a8907f435e1b6ca55fa816ffb81b47a018db03.tar.gz
volse-hubzilla-93a8907f435e1b6ca55fa816ffb81b47a018db03.tar.bz2
volse-hubzilla-93a8907f435e1b6ca55fa816ffb81b47a018db03.zip
force login to ssl on SSL_POLICY_SELFSIGN
-rwxr-xr-xboot.php18
-rwxr-xr-xview/login.tpl2
-rwxr-xr-xview/logout.tpl2
3 files changed, 13 insertions, 9 deletions
diff --git a/boot.php b/boot.php
index 22a4e39be..c4cfbe5bf 100755
--- a/boot.php
+++ b/boot.php
@@ -696,6 +696,7 @@ function get_guid($size=16) {
if(! function_exists('login')) {
function login($register = false, $hiddens=false) {
+ $a = get_app();
$o = "";
$reg = false;
if ($register) {
@@ -715,23 +716,26 @@ function login($register = false, $hiddens=false) {
}
+ $dest_url = $a->get_baseurl(true) . '/' . $a->query_string;
$o .= replace_macros($tpl,array(
- '$logout' => t('Logout'),
- '$login' => t('Login'),
+
+ '$dest_url' => $dest_url,
+ '$logout' => t('Logout'),
+ '$login' => t('Login'),
'$lname' => array('username', t('Nickname or Email address: ') , '', ''),
'$lpassword' => array('password', t('Password: '), '', ''),
'$openid' => !$noid,
- '$lopenid' => array('openid_url', t('Or login using OpenID: '),'',''),
+ '$lopenid' => array('openid_url', t('Or login using OpenID: '),'',''),
- '$hiddens' => $hiddens,
+ '$hiddens' => $hiddens,
- '$register' => $reg,
+ '$register' => $reg,
- '$lostpass' => t('Forgot your password?'),
- '$lostlink' => t('Password Reset'),
+ '$lostpass' => t('Forgot your password?'),
+ '$lostlink' => t('Password Reset'),
));
call_hooks('login_hook',$o);
diff --git a/view/login.tpl b/view/login.tpl
index 5349fa3d8..4cbbb1624 100755
--- a/view/login.tpl
+++ b/view/login.tpl
@@ -1,5 +1,5 @@
-<form action="" method="post" >
+<form action="$dest_url" method="post" >
<input type="hidden" name="auth-params" value="login" />
<div id="login_standard">
diff --git a/view/logout.tpl b/view/logout.tpl
index 6a84a5bbc..efc971df8 100755
--- a/view/logout.tpl
+++ b/view/logout.tpl
@@ -1,4 +1,4 @@
-<form action="" method="post" >
+<form action="$dest_url" method="post" >
<div class="logout-wrapper">
<input type="hidden" name="auth-params" value="logout" />
<input type="submit" name="submit" id="logout-button" value="$logout" />