From b536c8a10c0d5267af13c8ffb3bd31aae558c1d5 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 3 Sep 2014 10:24:41 +0200 Subject: [PATCH 01/14] Add missing image into amarok theme --- htdocs/theme/amarok/img/object_address.png | Bin 0 -> 1645 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 htdocs/theme/amarok/img/object_address.png diff --git a/htdocs/theme/amarok/img/object_address.png b/htdocs/theme/amarok/img/object_address.png new file mode 100644 index 0000000000000000000000000000000000000000..b20734da69abc6d778f525e70f27b74ff67f07b2 GIT binary patch literal 1645 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%u1Od5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|80+w{G(j&jGsVin(!#{m#Ms!(3>eCWu7(z-t_H3y=FVo0#>N(I zu5K{BF8Rr&xv6<2Fuf@Vy(T#If|5dR0nlcb)S}F?)D*X({9FaFm#s2!yTuTvc~HG6 zxZPreQ?EYIG5Vm0MT%&c5HR(CnDAr^vC~<85XU69X7Cd4X;>gR0ytSq1*{xsaZf(*JU)$epxBk@4taY=a%(v#0`9*3$ z!^DZl11yCde6%&T>bM&BDRZ~@XEyAdKr3aV2vu01r zCW$#chmRlSyp*!L90qnwzY4`FVdQ&MBb@0E{els{jB1 literal 0 HcmV?d00001 From 8a3bc250297c7d4e61be3204bac35398037ace91 Mon Sep 17 00:00:00 2001 From: Cubexed Date: Fri, 12 Sep 2014 17:21:48 +0200 Subject: [PATCH 02/14] -Renamed POST "project" to "projectstart" to avoid strange behavior at project start date selector, probably the generic name "project" was interfering with something --- htdocs/projet/fiche.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index 123b4a611b4..d79ba993ff9 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -63,7 +63,7 @@ $result = restrictedArea($user, 'projet', $object->id); // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); -$date_start=dol_mktime(0,0,0,GETPOST('projectmonth','int'),GETPOST('projectday','int'),GETPOST('projectyear','int')); +$date_start=dol_mktime(0,0,0,GETPOST('projectstartmonth','int'),GETPOST('projectstartday','int'),GETPOST('projectstartyear','int')); $date_end=dol_mktime(0,0,0,GETPOST('projectendmonth','int'),GETPOST('projectendday','int'),GETPOST('projectendyear','int')); @@ -216,7 +216,7 @@ if (empty($reshook)) $object->socid = GETPOST('socid','int'); $object->description = GETPOST('description'); // Do not use 'alpha' here, we want field as it is $object->public = GETPOST('public','alpha'); - $object->date_start = empty($_POST["project"])?'':$date_start; + $object->date_start = empty($_POST["projectstart"])?'':$date_start; $object->date_end = empty($_POST["projectend"])?'':$date_end; // Fill array 'array_options' with data from add form @@ -447,7 +447,7 @@ if ($action == 'create' && $user->rights->projet->creer) // Date start print ''.$langs->trans("DateStart").''; - print $form->select_date(($date_start?$date_start:''),'project'); + print $form->select_date(($date_start?$date_start:''),'projectstart'); print ''; // Date end @@ -581,7 +581,7 @@ else // Date start print ''.$langs->trans("DateStart").''; - print $form->select_date($object->date_start?$object->date_start:-1,'project'); + print $form->select_date($object->date_start?$object->date_start:-1,'projectstart'); print '     '. $langs->trans("ProjectReportDate"); From 8dd935821455b81a9f40d806d5f1930f7ab9c2a9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 13 Sep 2014 19:04:25 +0200 Subject: [PATCH 03/14] Fix: SQL injection --- ChangeLog | 7 ++++--- htdocs/adherents/class/adherent.class.php | 2 +- htdocs/adherents/liste.php | 10 +++++----- htdocs/cashdesk/index.php | 3 ++- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/commande/info.php | 6 +++--- htdocs/commande/orderstoinvoice.php | 6 +++--- htdocs/compta/bank/bankid_fr.php | 2 +- .../prelevement/class/bonprelevement.class.php | 2 +- htdocs/compta/prelevement/liste.php | 10 +++++----- htdocs/compta/prelevement/rejets.php | 3 ++- htdocs/compta/recap-compta.php | 2 +- htdocs/contact/info.php | 10 +++++----- htdocs/contrat/class/contrat.class.php | 4 ++-- htdocs/contrat/info.php | 6 +++--- htdocs/core/class/commonobject.class.php | 2 +- .../fourn/class/fournisseur.commande.class.php | 2 +- htdocs/holiday/index.php | 6 +++--- htdocs/opensurvey/list.php | 6 +++--- htdocs/product/index.php | 12 ++++++------ htdocs/product/stats/contrat.php | 6 +++--- htdocs/product/stock/liste.php | 16 ++++++++-------- htdocs/product/stock/massstockmove.php | 6 +++--- htdocs/product/stock/replenishorders.php | 13 ++++--------- htdocs/projet/class/project.class.php | 2 +- htdocs/projet/class/task.class.php | 2 +- htdocs/projet/contact.php | 4 ++-- htdocs/projet/tasks/index.php | 6 +++--- 28 files changed, 78 insertions(+), 80 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3b4def098c1..04e63ec1c8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,9 +21,10 @@ Fix: When disabled, all fields to add time into task line must be disabled. Fix: Missing include files.lib.php in some pages to use dol_delete_recursive. Fix: [ bug #1558 ] Product/service edit page title shows new Ref instead of old ref. Fix: [ bug #1553 ] Saving User displays setup removes menu. -Fix: [ bug #1544 ] Can remove date from invoice -Fix: list event view lost type event filter -Fix: Add code save on create event +Fix: [ bug #1544 ] Can remove date from invoice. +Fix: list event view lost type event filter. +Fix: Add code save on create event. +Fix: SQL injection. ***** ChangeLog for 3.5.4 compared to 3.5.3 ***** Fix: Hide title of event when agenda module disabled. diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index f82f3005514..bf0360c11ce 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1072,7 +1072,7 @@ class Adherent extends CommonObject if ($rowid) $sql.= " AND d.rowid=".$rowid; elseif ($ref || $fk_soc) { $sql.= " AND d.entity IN (".getEntity().")"; - if ($ref) $sql.= " AND d.rowid='".$ref."'"; + if ($ref) $sql.= " AND d.rowid='".$this->db->escape($ref)."'"; elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'"; } elseif ($ref_ext) diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 3a34403425f..1d80c82a713 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -118,24 +118,24 @@ if ($type > 0) } if (isset($_GET["statut"]) || isset($_POST["statut"])) { - $sql.=" AND d.statut in (".$statut.")"; // Peut valoir un nombre ou liste de nombre separes par virgules + $sql.=" AND d.statut in (".$db->escape($statut).")"; // Peut valoir un nombre ou liste de nombre separes par virgules } if ($search_ref) { - if (is_numeric($search_ref)) $sql.= " AND (d.rowid = ".$search_ref.")"; + if (is_numeric($search_ref)) $sql.= " AND (d.rowid = ".$db->escape($search_ref).")"; else $sql.=" AND 1 = 2"; // Always wrong } if ($search_lastname) { - $sql.= " AND (d.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; + $sql.= " AND (d.firstname LIKE '%".$db->escape($search_lastname)."%' OR d.lastname LIKE '%".$db->escape($search_lastname)."%')"; } if ($search_login) { - $sql.= " AND d.login LIKE '%".$search_login."%'"; + $sql.= " AND d.login LIKE '%".$db->escape($search_logi)."%'"; } if ($search_email) { - $sql.= " AND (d.email LIKE '%".$search_email."%')"; + $sql.= " AND (d.email LIKE '%".$db->escape($search_email)."%')"; } if ($filter == 'uptodate') { diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index fe4171de72e..25aa73211d2 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -39,6 +39,7 @@ if ( $_SESSION['uid'] > 0 ) } $usertxt=GETPOST('user','',1); +$err=GETPOST("err"); /* @@ -64,7 +65,7 @@ top_htmlhead('','',0,0,'',$arrayofcss);