Browse Source

force login to ssl on SSL_POLICY_SELFSIGN

pull/135/merge
friendica 10 years ago
parent
commit
93a8907f43
  1. 18
      boot.php
  2. 2
      view/login.tpl
  3. 2
      view/logout.tpl

18
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);

2
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">

2
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" />

Loading…
Cancel
Save