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  4935ce443c97907c1cba238475201824d01c0c2b (commit)
      from  71d207d9a584aef520cbdd6f5c09ca74b752f91a (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=4935ce443c97907c1cba238475201824d01c0c2b

commit 4935ce443c97907c1cba238475201824d01c0c2b
Author: Franck Villaume <[email protected]>
Date:   Sat Apr 10 12:55:56 2021 +0200

    get rid of get_magic_quotes_gpc()

diff --git a/src/common/include/HTTPRequest.class.php 
b/src/common/include/HTTPRequest.class.php
index 74a388f..6c5f737 100644
--- a/src/common/include/HTTPRequest.class.php
+++ b/src/common/include/HTTPRequest.class.php
@@ -1,6 +1,7 @@
 <?php
 /**
  * Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights 
reserved
+ * Copyright 2021, Franck Villaume - TrivialDev
  *
  * This file is a part of Fusionforge.
  *
@@ -112,8 +113,7 @@ class HTTPRequest extends Codendi_Request {
        }
 
        /**
-        * Get the value of $variable in $array. If magic_quotes are enabled, 
the
-        * value is escaped.
+        * Get the value of $variable in $array.
         *
         * @access private
         * @param string $variable Name of the parameter to get.
@@ -122,7 +122,7 @@ class HTTPRequest extends Codendi_Request {
         */
        function _get($variable, $array) {
                if ($this->_exist($variable, $array)) {
-                       return 
(get_magic_quotes_gpc()?$this->_stripslashes($array[$variable]):$array[$variable]);
+                       return $array[$variable];
                } else {
                        return false;
                }
diff --git a/src/common/include/Navigation.class.php 
b/src/common/include/Navigation.class.php
index d543cd5..ccfc4a2 100644
--- a/src/common/include/Navigation.class.php
+++ b/src/common/include/Navigation.class.php
@@ -3,7 +3,7 @@
  * FusionForge navigation
  *
  * Copyright 2009 - 2010, Olaf Lenz
- * Copyright 2011-2012,2016,2020, Franck Villaume - TrivialDev
+ * Copyright 2011-2012,2016,2020-2021, Franck Villaume - TrivialDev
  * Copyright 2014, Stéphane-Eymeric Bredthauer
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -126,13 +126,6 @@ class Navigation extends FFError {
                global $words, $forum_id, $group_id, $group_project_id, $atid, 
$exact, $type_of_search, $HTML;
 
                $res = "";
-               if (get_magic_quotes_gpc()) {
-                       $defaultWords = stripslashes($words);
-               } else {
-                       $defaultWords = $words;
-               }
-
-               $defaultWords = htmlspecialchars($defaultWords);
 
                // if there is no search currently, set the default
                if (!isset($type_of_search) ) {
@@ -168,7 +161,7 @@ class Navigation extends FFError {
                foreach($parameters AS $name => $value) {
                        $res .= html_e('input', array('type' => 'hidden', 
'value' => $value, 'name' => $name));
                }
-               $res .= html_e('input', array('type' => 'text', 'size' => 12, 
'id' => 'searchBox-words', 'name' => 'words', 'value' => $defaultWords, 
'required' => 'required'));
+               $res .= html_e('input', array('type' => 'text', 'size' => 12, 
'id' => 'searchBox-words', 'name' => 'words', 'value' => $words, 'required' => 
'required'));
                $res .= html_e('input', array('type' => 'submit', 'name' => 
'Search', 'value' => _('Search')));
 
                if (isset($group_id) && $group_id) {
diff --git a/src/www/admin/admin_utils.php b/src/www/admin/admin_utils.php
index 39574b1..2fb51b4 100644
--- a/src/www/admin/admin_utils.php
+++ b/src/www/admin/admin_utils.php
@@ -22,9 +22,6 @@
 
 function check_system() {
        $result = array();
-       if (get_magic_quotes_gpc()) {
-               $result[] = 'Error: Your installation is running with PHP 
magic_quotes_gpc ON, please change to OFF';
-       }
        if (ini_get('register_globals')) {
                $result[] = 'Error: Your installation is running with PHP 
register_globals ON, this is very unsecure, please change to OFF';
        }
diff --git a/src/www/scm/include/viewvc_utils.php 
b/src/www/scm/include/viewvc_utils.php
index 50a81d1..64a8d80 100644
--- a/src/www/scm/include/viewvc_utils.php
+++ b/src/www/scm/include/viewvc_utils.php
@@ -36,9 +36,6 @@
  * @return string  The argument with dangerous shell characters escaped.
  */
 function make_arg_cmd_safe($arg) {
-       if (get_magic_quotes_gpc()) {
-               $arg = stripslashes($arg);
-       }
        return escapeshellcmd($arg);
 }
 

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

Summary of changes:
 src/common/include/HTTPRequest.class.php |  6 +++---
 src/common/include/Navigation.class.php  | 11 ++---------
 src/www/admin/admin_utils.php            |  3 ---
 src/www/scm/include/viewvc_utils.php     |  3 ---
 4 files changed, 5 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to