[Fusionforge-commits] FusionForge branch master updated. v6.1-128-ga5a3788

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Dec 2 13:51:07 CET 2018


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  a5a3788f9f15f3accc41648be85ebfba950ad7b0 (commit)
       via  067221d569d3b1c18a984cea85244032b2be4344 (commit)
       via  37f0eaa644aec460f5107cf47871c014b27749a9 (commit)
       via  b7012c1b9ae81a179498ffce01f4fe49c7e48272 (commit)
       via  d29c67f8f58bfbc2dbd7b3b0c23299f11a3af19d (commit)
       via  ffd4a916ba1b51af1326b9a2e17d476769306d56 (commit)
      from  5ffadb9359bbdccbcce8462e827e91d42f07b875 (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=a5a3788f9f15f3accc41648be85ebfba950ad7b0

commit a5a3788f9f15f3accc41648be85ebfba950ad7b0
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 2 13:50:48 2018 +0100

    drop session_set_cookie. Use session_cookie directly

diff --git a/src/common/include/session.php b/src/common/include/session.php
index 82c5458..902019b 100644
--- a/src/common/include/session.php
+++ b/src/common/include/session.php
@@ -341,7 +341,7 @@ function session_issecure() {
 }
 
 /**
- *	session_set_cookie() - Set a session cookie
+ *	session_cookie() - Set a session cookie
  *
  *	Set a cookie with default temporal scope of the current browser session
  *	and URL space of the current webserver
@@ -351,9 +351,6 @@ function session_issecure() {
  *	@param	string	$domain		Domain scope (default '')
  *	@param	int	$expiration	Expiration time in UNIX seconds (default 0)
  */
-function session_set_cookie($name, $value, $domain='', $expiration=0) {
-	session_cookie($name, $value, $domain, $expiration);
-}
 function session_cookie($name, $value, $domain='', $expiration=0) {
 	if (php_sapi_name() == 'cli') {
 		return;

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=067221d569d3b1c18a984cea85244032b2be4344

commit 067221d569d3b1c18a984cea85244032b2be4344
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 2 13:49:55 2018 +0100

    use session_cookie function

diff --git a/src/common/include/AuthPlugin.class.php b/src/common/include/AuthPlugin.class.php
index 104c29f..09c5dd0 100644
--- a/src/common/include/AuthPlugin.class.php
+++ b/src/common/include/AuthPlugin.class.php
@@ -200,7 +200,7 @@ abstract class ForgeAuthPlugin extends Plugin {
 	protected function setSessionCookie() {
 		if($this->saved_user) {
 			$cookie = session_build_session_token($this->saved_user->getID());
-			session_set_cookie($this->getCookieName(), $cookie, "", forge_get_config('session_expire'));
+			session_cookie($this->getCookieName(), $cookie, "", forge_get_config('session_expire'));
 		}
 	}
 
@@ -225,12 +225,12 @@ abstract class ForgeAuthPlugin extends Plugin {
 		}
 	}
 
-    function refreshAuthSession() {
-            $this->setSessionCookie();
-    }
+	function refreshAuthSession() {
+		$this->setSessionCookie();
+	}
 
 	protected function unsetSessionCookie() {
-		session_set_cookie($this->getCookieName(), '');
+		session_cookie($this->getCookieName(), '');
 	}
 
 	/**

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=37f0eaa644aec460f5107cf47871c014b27749a9

commit 37f0eaa644aec460f5107cf47871c014b27749a9
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 2 13:49:18 2018 +0100

    oauthconsumer plugin: fix cookie function

diff --git a/src/plugins/oauthconsumer/www/get_access_token.php b/src/plugins/oauthconsumer/www/get_access_token.php
index 0ffc014..9ee8cab 100644
--- a/src/plugins/oauthconsumer/www/get_access_token.php
+++ b/src/plugins/oauthconsumer/www/get_access_token.php
@@ -121,7 +121,7 @@ if(count($providers)>0)	{
 		if($f_not_verify_ssl) {
 			curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, 0);
 			curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0);
-			session_set_cookie('NOT_VERIFY_SSL', 1, 0, '', '', false, true);
+			setcookie('NOT_VERIFY_SSL', 1, 0, '', '', false, true);
 		}
 
 		$request_token_string = curl_exec ($curl);

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=b7012c1b9ae81a179498ffce01f4fe49c7e48272

commit b7012c1b9ae81a179498ffce01f4fe49c7e48272
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 2 13:48:55 2018 +0100

    cleanup

diff --git a/src/plugins/oauthconsumer/include/fusionforge_oauth_datastore.php b/src/plugins/oauthconsumer/include/fusionforge_oauth_datastore.php
index f8f7e33..2fbaebe 100644
--- a/src/plugins/oauthconsumer/include/fusionforge_oauth_datastore.php
+++ b/src/plugins/oauthconsumer/include/fusionforge_oauth_datastore.php
@@ -157,11 +157,11 @@ class FFOAuthDataStore extends OAuthDataStore {
 	}
 
 
-  /**
-   * Deletes a provider from the DB
-   *
-   * @param int $provider_id
-   */
+	/**
+	 * Deletes a provider from the DB
+	 *
+	 * @param int $provider_id
+	 */
 	public function delete_provider( $provider_id ) {
 
 		$t_provider_table = "plugin_oauthconsumer_provider";
@@ -179,11 +179,11 @@ class FFOAuthDataStore extends OAuthDataStore {
 	}
 
 	/**
-	* Saves an OAuthAccessToken to the DB
-	*
-	* @param OAuthAccessToken $token
-	* @return int the token ID in the DB
-	*/
+	 * Saves an OAuthAccessToken to the DB
+	 *
+	 * @param OAuthAccessToken $token
+	 * @return int the token ID in the DB
+	 */
 	public function save_access_token($token) {
 
 		$t_token_table = "plugin_oauthconsumer_access_token";
@@ -206,11 +206,11 @@ class FFOAuthDataStore extends OAuthDataStore {
 	}
 
 	/**
-	* Retrieve a table of columns values for all access tokens (of a user)
-	*
-	* @param int $user_id
-	* @return array of arrays of column values
-	*/
+	 * Retrieve a table of columns values for all access tokens (of a user)
+	 *
+	 * @param int $user_id
+	 * @return array of arrays of column values
+	 */
 	public function find_all_access_tokens($user_id) {
 		$t_token_table = "plugin_oauthconsumer_access_token";
 		if(isset($user_id)||($user_id)) {
@@ -228,11 +228,11 @@ class FFOAuthDataStore extends OAuthDataStore {
 	}
 
 	/**
-	* Retrieve values of columns for a token in the DB provided its key
-	*
-	* @param string $token_key
-	* @return array of column values
-	*/
+	 * Retrieve values of columns for a token in the DB provided its key
+	 *
+	 * @param string $token_key
+	 * @return array of column values
+	 */
 	public function find_access_token_from_key($token_key) {
 		$t_token_table = "plugin_oauthconsumer_access_token";
 
@@ -292,11 +292,11 @@ class FFOAuthDataStore extends OAuthDataStore {
 	}
 
 	/**
-	* Deletes an access token from the DB
-	*
-	* @param string $token_type
-	* @param int $token_id
-	*/
+	 * Deletes an access token from the DB
+	 *
+	 * @param string $token_type
+	 * @param int $token_id
+	 */
 	function delete_access_token($token_id) {
 		$t_token_table = "plugin_oauthconsumer_access_token";
 
@@ -313,11 +313,11 @@ class FFOAuthDataStore extends OAuthDataStore {
 	}
 
 	/**
-	* Saves an OAuthResource to the DB
-	*
-	* @param OAuthResource $resource
-	* @return int the resource ID in the DB
-	*/
+	 * Saves an OAuthResource to the DB
+	 *
+	 * @param OAuthResource $resource
+	 * @return int the resource ID in the DB
+	 */
 	public function save_oauth_resource($resource) {
 
 		$t_resource_table = "plugin_oauthconsumer_resource";
@@ -340,7 +340,5 @@ class FFOAuthDataStore extends OAuthDataStore {
 			db_query_params( $t_query, array ($resource->get_url(), $resource->get_provider_id(), $resource->get_http_method(), $resource->get_id()) );
 		}
 		return $provider_id;
-
 	}
-
 }

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=d29c67f8f58bfbc2dbd7b3b0c23299f11a3af19d

commit d29c67f8f58bfbc2dbd7b3b0c23299f11a3af19d
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 2 13:38:53 2018 +0100

    drop obsolete code

diff --git a/src/common/include/session.php b/src/common/include/session.php
index b37b5f9..82c5458 100644
--- a/src/common/include/session.php
+++ b/src/common/include/session.php
@@ -366,12 +366,7 @@ function session_cookie($name, $value, $domain='', $expiration=0) {
 	if ($force_secure && !session_issecure()) {
 		return;
 	}
-	if (PHP_MAJOR_VERSION < 5 || PHP_MINOR_VERSION < 2) {
-		// In PHP < 5.2, setcookie accepts at most 6 parameters
-		setcookie($name, $value, $expiration, '/', $domain, $force_secure);
-	} else {
-		setcookie($name, $value, $expiration, '/', $domain, $force_secure, true);
-	}
+	setcookie($name, $value, $expiration, '/', $domain, $force_secure, true);
 }
 
 /**

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=ffd4a916ba1b51af1326b9a2e17d476769306d56

commit ffd4a916ba1b51af1326b9a2e17d476769306d56
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 2 13:37:18 2018 +0100

    drop useless check

diff --git a/src/www/admin/admin_utils.php b/src/www/admin/admin_utils.php
index 646db4a..39574b1 100644
--- a/src/www/admin/admin_utils.php
+++ b/src/www/admin/admin_utils.php
@@ -22,10 +22,6 @@
 
 function check_system() {
 	$result = array();
-
-	if (version_compare(PHP_VERSION, '5.1.0', '<')) {
-		$result[] = 'WARNING: Your php version must not be lower than 5.1.0, please upgrade';
-	}
 	if (get_magic_quotes_gpc()) {
 		$result[] = 'Error: Your installation is running with PHP magic_quotes_gpc ON, please change to OFF';
 	}
@@ -38,9 +34,6 @@ function check_system() {
 	if (util_ini_get_bytes('upload_max_filesize') < 8*1024*1024) {
 		$result[] = 'WARNING: PHP value "upload_max_filesize" is low, recommended is at least 8M';
 	}
-	if (!function_exists("pg_pconnect")) {
-		$result[] = 'Error: Missing Postgresql support in PHP, please install/compile php-pg.';
-	}
 	if (forge_get_config('use_shell')) {
 		// verify the compatibility between the user_default_shell ini var and the contents of .../etc/shells
 		$user_default_shell = forge_get_config('user_default_shell');

-----------------------------------------------------------------------

Summary of changes:
 src/common/include/AuthPlugin.class.php            | 10 ++--
 src/common/include/session.php                     | 12 +----
 .../include/fusionforge_oauth_datastore.php        | 62 +++++++++++-----------
 src/plugins/oauthconsumer/www/get_access_token.php |  2 +-
 src/www/admin/admin_utils.php                      |  7 ---
 5 files changed, 38 insertions(+), 55 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list