aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-03-15 01:02:44 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-03-15 01:02:44 -0400
commit6e133e75c3ed12a4637d9cc946b1cb838619b9cc (patch)
tree44eb74a6943ecc26a795f136e79d653c39955d63 /boot.php
parentebccf13c4c883e1438f4446d6aeba070ce6ee967 (diff)
parentb06c5983a4dae26dd24aecd7473bad98558cd6fc (diff)
downloadvolse-hubzilla-6e133e75c3ed12a4637d9cc946b1cb838619b9cc.tar.gz
volse-hubzilla-6e133e75c3ed12a4637d9cc946b1cb838619b9cc.tar.bz2
volse-hubzilla-6e133e75c3ed12a4637d9cc946b1cb838619b9cc.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: don't allow multiple friends with http/https same person, don't show mail2 coming soon unless person is allowed to have email contacts roll protocol version due to ssl_policy settings force login to ssl on SSL_POLICY_SELFSIGN basic ssl_policy for important modules ssl_policy stuff revup splitted tests into several files removed done TODO get_tags tests corrected. They test for the right things now. addon settings form error more work on filer, comment level and file tag removal added slack-NS, non-scrolly, slackr-based theme. get tags test improved splitted test cases. changed a test string added some tests added library and include to .htaccess excludes reports from git better tests added test blueprints, fixed? encoding issues * master:
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php41
1 files changed, 28 insertions, 13 deletions
diff --git a/boot.php b/boot.php
index 749ef6e3f..04f36093b 100755
--- a/boot.php
+++ b/boot.php
@@ -9,8 +9,8 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
-define ( 'FRIENDICA_VERSION', '2.3.1280' );
-define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
+define ( 'FRIENDICA_VERSION', '2.3.1281' );
+define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1131 );
define ( 'EOL', "<br />\r\n" );
@@ -379,11 +379,22 @@ class App {
$scheme = $this->scheme;
- if(x($this->config,'ssl_policy')) {
- if(($ssl) || ($this->config['ssl_policy'] == SSL_POLICY_FULL))
- $scheme = 'https';
- if(($this->config['ssl_policy'] == SSL_POLICY_SELFSIGN) && (local_user() || x($_POST,'auth-params')))
+ if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) {
+ if($this->config['system']['ssl_policy'] == SSL_POLICY_FULL)
$scheme = 'https';
+
+// We need to populate the $ssl flag across the entire program before turning this on.
+// Basically, we'll have $ssl = true on any links which can only be seen by a logged in user
+// (and also the login link). Anything seen by an outsider will have it turned off.
+// At present, setting SSL_POLICY_SELFSIGN will only force remote contacts to update their
+// contact links to this site with "http:" if they are currently using "https:"
+
+// if($this->config['system']['ssl_policy'] == SSL_POLICY_SELFSIGN) {
+// if($ssl)
+// $scheme = 'https';
+// else
+// $scheme = 'http';
+// }
}
$this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
@@ -685,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) {
@@ -704,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);