This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via 015b78b6a061cd928cb226e18a41b1096b0511ff (commit)
from 368d0123414567dbd27fde07eae9b6ef3c67d75b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=015b78b6a061cd928cb226e18a41b1096b0511ff
commit 015b78b6a061cd928cb226e18a41b1096b0511ff
Author: Franck Villaume <[email protected]>
Date: Tue Oct 11 17:00:09 2016 +0200
support X_FORWARD_PROTO for https detection & fix register redirect with
url_prefix support
diff --git a/src/common/include/session.php b/src/common/include/session.php
index e79bf20..01a6b65 100644
--- a/src/common/include/session.php
+++ b/src/common/include/session.php
@@ -5,9 +5,9 @@
* Copyright 1999-2001, VA Linux Systems, Inc.
* Copyright 2001-2002, 2009, Roland Mas
* Copyright 2004-2005, GForge, LLC
- * Copyright 2013, Franck Villaume - TrivialDev
* Copyright © 2013
* Thorsten “mirabilos” Glaser <[email protected]>
+ * Copyright 2013,2016, Franck Villaume - TrivialDev
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
@@ -322,7 +322,10 @@ function session_check_ip($oldip, $newip) {
* @return bool
*/
function session_issecure() {
- return (strtoupper(getStringFromServer('HTTPS')) == "ON");
+ if ((strtoupper(getStringFromServer('HTTPS')) == 'ON') ||
(strtoupper(getStringFromServer('HTTP_X_FORWARDED_PROTO')) == 'HTTPS')) {
+ return true;
+ }
+ return false;
}
/**
diff --git a/src/www/account/register.php b/src/www/account/register.php
index b7b10f8..e21fefd 100644
--- a/src/www/account/register.php
+++ b/src/www/account/register.php
@@ -5,7 +5,7 @@
* Copyright 1999-2001 (c) VA Linux Systems
* Copyright 2010 (c) FusionForge Team
* Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2013-2014, Franck Villaume - TrivialDev
+ * Copyright 2013-2014,2016, Franck Villaume - TrivialDev
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
@@ -56,7 +56,7 @@ $accept_conditions = getIntFromRequest ('accept_conditions');
if (forge_get_config('use_ssl') && !session_issecure()) {
//force use of SSL for login
- header('Location:
https://'.getStringFromServer('HTTP_HOST').getStringFromServer('REQUEST_URI'));
+ header('Location:
https://'.getStringFromServer('HTTP_HOST').forge_get_config('url_prefix').getStringFromServer('REQUEST_URI'));
}
if (!$theme_id || !is_numeric($theme_id)) {
-----------------------------------------------------------------------
Summary of changes:
src/common/include/session.php | 7 +++++--
src/www/account/register.php | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits