summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-07-23 06:35:52 +0200
committerRemi Collet <fedora@famillecollet.com>2016-07-23 06:35:52 +0200
commit7a28706a1a1e3f9acddd8a67ef860ebf03814483 (patch)
tree5e01f8d8e004e889339ea5bc0c967225c0a0431f
parent095d9c07713c56e0da0c79efc306f6fc860c4033 (diff)
glpi: fix regression
-rw-r--r--glpi-0.90-upstream2.patch59
-rw-r--r--glpi.spec9
2 files changed, 66 insertions, 2 deletions
diff --git a/glpi-0.90-upstream2.patch b/glpi-0.90-upstream2.patch
new file mode 100644
index 0000000..148d2f8
--- /dev/null
+++ b/glpi-0.90-upstream2.patch
@@ -0,0 +1,59 @@
+From 4a857c3bfd2354196b7035e1ab6356b724813df7 Mon Sep 17 00:00:00 2001
+From: Johan Cwiklinski <jcwiklinski@teclib.com>
+Date: Tue, 19 Jul 2016 16:17:38 +0200
+Subject: [PATCH] Only check for param name, we do not have any CommonDBTM
+ subclass here
+
+---
+ ajax/dropdownRubDocument.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ajax/dropdownRubDocument.php b/ajax/dropdownRubDocument.php
+index f057b6c..15f321d 100644
+--- a/ajax/dropdownRubDocument.php
++++ b/ajax/dropdownRubDocument.php
+@@ -67,7 +67,7 @@
+ }
+ }
+
+- if (!is_subclass_of($_POST['myname'], 'CommonDBTM')) {
++ if (preg_match('/[^a-z_\-0-9]/i', $_POST['myname'])) {
+ throw new \RuntimeException('Invalid name provided!');
+ }
+
+From fae0968a43947354598e073ab311970b5eb546e5 Mon Sep 17 00:00:00 2001
+From: Johan Cwiklinski <jcwiklinski@teclib.com>
+Date: Tue, 19 Jul 2016 16:36:09 +0200
+Subject: [PATCH] Fix overrided variable
+
+---
+ ajax/dropdownRubDocument.php | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/ajax/dropdownRubDocument.php b/ajax/dropdownRubDocument.php
+index 15f321d..9a1cab3 100644
+--- a/ajax/dropdownRubDocument.php
++++ b/ajax/dropdownRubDocument.php
+@@ -50,16 +50,16 @@
+
+ // Clean used array
+ if (isset($_POST['used']) && is_array($_POST['used']) && (count($_POST['used']) > 0)) {
+- $used = '';
+- foreach ($_POST['used'] as $used) {
+- if ($used !== '') {
+- $used .= ', ';
++ $used_qry = '';
++ foreach ($_POST['used'] as $current_used) {
++ if ($used_qry !== '') {
++ $used_qry .= ', ';
+ }
+- $used .= (int)$used;
++ $used_qry .= (int)$current_used;
+ }
+ $query = "SELECT `id`
+ FROM `glpi_documents`
+- WHERE `id` IN (".$used.")
++ WHERE `id` IN (".$used_qry.")
+ AND `documentcategories_id` = '".(int)$_POST["rubdoc"]."'";
+
+ foreach ($DB->request($query) AS $data) {
diff --git a/glpi.spec b/glpi.spec
index 67e9094..23f2c76 100644
--- a/glpi.spec
+++ b/glpi.spec
@@ -28,7 +28,7 @@
Name: glpi
Version: 0.90.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Free IT asset management software
Summary(fr): Gestion Libre de Parc Informatique
@@ -47,8 +47,9 @@ Source4: glpi-nginx.conf
Patch0: glpi-0.90-cron.patch
# Fix autoloader
Patch1: glpi-0.90-autoload.patch
-# Upstream patch
+# Upstream patches
Patch2: glpi-0.90-upstream.patch
+Patch3: glpi-0.90-upstream2.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -134,6 +135,7 @@ grep %{version} config/define.php
%patch0 -p0
%patch1 -p0
%patch2 -p1
+%patch3 -p1
find . -name \*.orig -exec rm {} \; -print
@@ -331,6 +333,9 @@ fi
%changelog
+* Sat Jul 23 2016 Remi Collet <remi@fedoraproject.org> - 0.90.4-2
+- fix regression in document form, adding upstream patch
+
* Tue Jul 19 2016 Remi Collet <remi@fedoraproject.org> - 0.90.4-1
- update to 0.90.4
https://github.com/glpi-project/glpi/issues?q=milestone:0.90.4