force login to ssl on SSL_POLICY_SELFSIGN

This commit is contained in:
friendica 2012-03-14 21:29:44 -07:00
parent 110e8f2919
commit 93a8907f43
3 changed files with 13 additions and 9 deletions

View File

@ -696,6 +696,7 @@ function get_guid($size=16) {
if(! function_exists('login')) { if(! function_exists('login')) {
function login($register = false, $hiddens=false) { function login($register = false, $hiddens=false) {
$a = get_app();
$o = ""; $o = "";
$reg = false; $reg = false;
if ($register) { 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( $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: ') , '', ''), '$lname' => array('username', t('Nickname or Email address: ') , '', ''),
'$lpassword' => array('password', t('Password: '), '', ''), '$lpassword' => array('password', t('Password: '), '', ''),
'$openid' => !$noid, '$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?'), '$lostpass' => t('Forgot your password?'),
'$lostlink' => t('Password Reset'), '$lostlink' => t('Password Reset'),
)); ));
call_hooks('login_hook',$o); call_hooks('login_hook',$o);

View File

@ -1,5 +1,5 @@
<form action="" method="post" > <form action="$dest_url" method="post" >
<input type="hidden" name="auth-params" value="login" /> <input type="hidden" name="auth-params" value="login" />
<div id="login_standard"> <div id="login_standard">

View File

@ -1,4 +1,4 @@
<form action="" method="post" > <form action="$dest_url" method="post" >
<div class="logout-wrapper"> <div class="logout-wrapper">
<input type="hidden" name="auth-params" value="logout" /> <input type="hidden" name="auth-params" value="logout" />
<input type="submit" name="submit" id="logout-button" value="$logout" /> <input type="submit" name="submit" id="logout-button" value="$logout" />