noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 77/107: Security : replace direct use of $_GE


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 77/107: Security : replace direct use of $_GET
Date: Mon, 26 Aug 2019 10:32:05 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 12b607e9fad4ae6ab57ff06f3768a6436736dcce
Author: Dany De Bontridder <address@hidden>
Date:   Fri Aug 9 13:25:07 2019 +0200

    Security : replace direct use of $_GET
---
 include/class/print_ledger_simple.class.php | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/include/class/print_ledger_simple.class.php 
b/include/class/print_ledger_simple.class.php
index ef21133..e2f81cd 100644
--- a/include/class/print_ledger_simple.class.php
+++ b/include/class/print_ledger_simple.class.php
@@ -24,12 +24,14 @@
  *  of any ledgers
  */
 require_once NOALYSS_INCLUDE.'/class/pdf.class.php';
+require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
 
 class Print_Ledger_Simple extends PDF
 {
     public function __construct ($p_cn,  Acc_Ledger $p_jrn)
     {
 
+        $http=new HttpInput();
         if($p_cn == null) die("No database connection. Abort.");
 
         parent::__construct($p_cn,'L', 'mm', 'A4');
@@ -48,7 +50,8 @@ class Print_Ledger_Simple extends PDF
          * get rappel to initialize amount rap_xx
          *the easiest way is to compute sum from quant_
          */
-        $this->previous=$this->ledger->previous_amount($_GET['from_periode']);
+        $from_periode=$http->get('from_periode',"number");
+        $this->previous=$this->ledger->previous_amount($from_periode);
 
         /* initialize the amount to report */
         foreach($this->previous['tva'] as $line_tva)
@@ -203,8 +206,10 @@ class Print_Ledger_Simple extends PDF
     function export()
     {
       bcscale(2);
-        $a_jrn=$this->ledger->get_operation($_GET['from_periode'],
-                                            $_GET['to_periode']);
+        $http=new HttpInput();
+
+        
$a_jrn=$this->ledger->get_operation($http->get('from_periode',"number"),
+                                            $http->get('to_periode',"number"));
 
         if ( $a_jrn == null ) return;
         for ( $i=0;$i<count($a_jrn);$i++)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]