librefm-commits
[Top][All Lists]
Advanced

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

[Librefm-commits] [1422] remove all references to print_r -- this seems


From: Matt Lee
Subject: [Librefm-commits] [1422] remove all references to print_r -- this seems to dump things, including passwords, to the screen.
Date: Fri, 08 May 2009 21:38:56 +0000

Revision: 1422
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1422
Author:   mattl
Date:     2009-05-08 21:38:55 +0000 (Fri, 08 May 2009)
Log Message:
-----------
remove all references to print_r -- this seems to dump things, including 
passwords, to the screen. not good.

Modified Paths:
--------------
    branches/stable/nixtape/data/Group.php
    branches/stable/nixtape/data/User.php
    branches/stable/nixtape/edit_group.php
    branches/stable/nixtape/user-edit.php
    branches/stable/nixtape/utils/arc/extractors/ARC2_PoshRdfExtractor.php
    branches/stable/nixtape/utils/arc/extractors/ARC2_RDFExtractor.php
    branches/stable/nixtape/utils/arc/extractors/ARC2_RdfaExtractor.php
    branches/stable/nixtape/utils/arc/parsers/ARC2_AtomParser.php
    branches/stable/nixtape/utils/arc/parsers/ARC2_CBJSONParser.php
    branches/stable/nixtape/utils/arc/parsers/ARC2_LegacyXMLParser.php
    branches/stable/nixtape/utils/arc/store/ARC2_StoreEndpoint.php
    branches/stable/nixtape/utils/arc/store/ARC2_StoreSelectQueryHandler.php
    trunk/nixtape/data/Group.php
    trunk/nixtape/data/User.php
    trunk/nixtape/delete-profile.php
    trunk/nixtape/edit_group.php
    trunk/nixtape/user-edit.php
    trunk/nixtape/utils/arc/extractors/ARC2_PoshRdfExtractor.php
    trunk/nixtape/utils/arc/extractors/ARC2_RDFExtractor.php
    trunk/nixtape/utils/arc/extractors/ARC2_RdfaExtractor.php
    trunk/nixtape/utils/arc/parsers/ARC2_AtomParser.php
    trunk/nixtape/utils/arc/parsers/ARC2_CBJSONParser.php
    trunk/nixtape/utils/arc/parsers/ARC2_LegacyXMLParser.php
    trunk/nixtape/utils/arc/store/ARC2_StoreEndpoint.php
    trunk/nixtape/utils/arc/store/ARC2_StoreSelectQueryHandler.php

Modified: branches/stable/nixtape/data/Group.php
===================================================================
--- branches/stable/nixtape/data/Group.php      2009-05-08 21:22:45 UTC (rev 
1421)
+++ branches/stable/nixtape/data/Group.php      2009-05-08 21:38:55 UTC (rev 
1422)
@@ -55,7 +55,7 @@
                        
                        if(PEAR::isError($res)) {
                                //header("Content-Type: text/plain");
-                               //print_r($res);
+                               ////($res);
                                echo "error in group.php";
                                exit;
                        }
@@ -174,7 +174,7 @@
                if(PEAR::isError($res))
                {
                        //header("Content-Type: text/plain");
-                       //print_r($res);
+                       ////($res);
                        echo "error in group.php";
                        exit;
                }
@@ -214,7 +214,7 @@
                
                if(PEAR::isError($res)) {
                        header("Content-Type: text/plain");
-                       //print_r($res);
+                       ////($res);
                        echo "error";
                        exit;
                }

Modified: branches/stable/nixtape/data/User.php
===================================================================
--- branches/stable/nixtape/data/User.php       2009-05-08 21:22:45 UTC (rev 
1421)
+++ branches/stable/nixtape/data/User.php       2009-05-08 21:38:55 UTC (rev 
1422)
@@ -125,7 +125,7 @@
                
                if(PEAR::isError($res)) {
                        header("Content-Type: text/plain");
-                       print_r($res);
+                       //($res);
                        exit;
                }
 

Modified: branches/stable/nixtape/edit_group.php
===================================================================
--- branches/stable/nixtape/edit_group.php      2009-05-08 21:22:45 UTC (rev 
1421)
+++ branches/stable/nixtape/edit_group.php      2009-05-08 21:38:55 UTC (rev 
1422)
@@ -115,7 +115,7 @@
        if (isset($errors[0]))
        {
                header("Content-Type: text/plain");
-               print_r($errors);
+               //($errors);
                exit;
        }
 }

Modified: branches/stable/nixtape/user-edit.php
===================================================================
--- branches/stable/nixtape/user-edit.php       2009-05-08 21:22:45 UTC (rev 
1421)
+++ branches/stable/nixtape/user-edit.php       2009-05-08 21:38:55 UTC (rev 
1422)
@@ -126,7 +126,7 @@
        if (isset($errors[0]))
        {
                header("Content-Type: text/plain");
-               print_r($errors);
+               //($errors);
                exit;
        }
 }

Modified: branches/stable/nixtape/utils/arc/extractors/ARC2_PoshRdfExtractor.php
===================================================================
--- branches/stable/nixtape/utils/arc/extractors/ARC2_PoshRdfExtractor.php      
2009-05-08 21:22:45 UTC (rev 1421)
+++ branches/stable/nixtape/utils/arc/extractors/ARC2_PoshRdfExtractor.php      
2009-05-08 21:38:55 UTC (rev 1422)
@@ -103,7 +103,7 @@
     /* new s */
     if ($this->hasClass($n, 'rdf-s')) {
       $lct['next_s'] = array($n['a']['class'], $this->getSubject($n, $lct));
-      //echo "\ns: " . print_r($lct['next_s'], 1);
+      //echo "\ns: " . //($lct['next_s'], 1);
     }
     /* p */
     if ($this->hasClass($n, 'rdf-p') || $this->hasRel($n, 'rdf-p')) {

Modified: branches/stable/nixtape/utils/arc/extractors/ARC2_RDFExtractor.php
===================================================================
--- branches/stable/nixtape/utils/arc/extractors/ARC2_RDFExtractor.php  
2009-05-08 21:22:45 UTC (rev 1421)
+++ branches/stable/nixtape/utils/arc/extractors/ARC2_RDFExtractor.php  
2009-05-08 21:38:55 UTC (rev 1422)
@@ -183,7 +183,7 @@
   }
   
   function getContent($n, $outer = 0, $trim = 1) {
-    //echo '<pre>' . htmlspecialchars(print_r($n, 1)) . '</pre>';
+    //echo '<pre>' . htmlspecialchars(//($n, 1)) . '</pre>';
     if ($n['tag'] == 'comment') {
       $r = '<!-- ' . $n['a']['value'] . ' -->';
     }

Modified: branches/stable/nixtape/utils/arc/extractors/ARC2_RdfaExtractor.php
===================================================================
--- branches/stable/nixtape/utils/arc/extractors/ARC2_RdfaExtractor.php 
2009-05-08 21:22:45 UTC (rev 1421)
+++ branches/stable/nixtape/utils/arc/extractors/ARC2_RdfaExtractor.php 
2009-05-08 21:38:55 UTC (rev 1422)
@@ -27,7 +27,7 @@
   /*  */
   
   function extractRDF() {
-    //echo '<pre>' . htmlspecialchars(print_r($this->nodes, 1)) . '</pre>';
+    //echo '<pre>' . htmlspecialchars(//($this->nodes, 1)) . '</pre>';
     if (!isset($this->caller->detected_formats['rdfa'])) return 0;
     $root_node = $this->getRootNode();
     //$base = $this->v('xml:base', $this->getDocBase(), $root_node['a']);

Modified: branches/stable/nixtape/utils/arc/parsers/ARC2_AtomParser.php
===================================================================
--- branches/stable/nixtape/utils/arc/parsers/ARC2_AtomParser.php       
2009-05-08 21:22:45 UTC (rev 1421)
+++ branches/stable/nixtape/utils/arc/parsers/ARC2_AtomParser.php       
2009-05-08 21:38:55 UTC (rev 1422)
@@ -53,7 +53,7 @@
   function addT($t) {
     //if (!isset($t['o_datatype']))
     if ($this->skip_dupes) {
-      //$h = md5(print_r($t, 1));
+      //$h = md5(//($t, 1));
       $h = md5(serialize($t));
       if (!isset($this->added_triples[$h])) {
         $this->triples[$this->t_count] = $t;
@@ -83,7 +83,7 @@
 
   function extractRDF() {
     $index = $this->getNodeIndex();
-    //print_r($index);
+    ////($index);
     $this->rdf = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
     $this->atom = 'http://www.w3.org/2005/atom';
     $this->rss = 'http://purl.org/rss/1.0/';

Modified: branches/stable/nixtape/utils/arc/parsers/ARC2_CBJSONParser.php
===================================================================
--- branches/stable/nixtape/utils/arc/parsers/ARC2_CBJSONParser.php     
2009-05-08 21:22:45 UTC (rev 1421)
+++ branches/stable/nixtape/utils/arc/parsers/ARC2_CBJSONParser.php     
2009-05-08 21:38:55 UTC (rev 1422)
@@ -43,7 +43,7 @@
       /* explicit triples */
       $this->extractResourceRDF($struct, $s);
     }
-    //print_r($struct);
+    ////($struct);
   }
   
   function getStructType($struct, $rel = '') {

Modified: branches/stable/nixtape/utils/arc/parsers/ARC2_LegacyXMLParser.php
===================================================================
--- branches/stable/nixtape/utils/arc/parsers/ARC2_LegacyXMLParser.php  
2009-05-08 21:22:45 UTC (rev 1421)
+++ branches/stable/nixtape/utils/arc/parsers/ARC2_LegacyXMLParser.php  
2009-05-08 21:38:55 UTC (rev 1422)
@@ -142,7 +142,7 @@
   }
   
   function getNodeContent($n, $outer = 0, $trim = 1) {
-    //echo '<pre>' . htmlspecialchars(print_r($n, 1)) . '</pre>';
+    //echo '<pre>' . htmlspecialchars(//($n, 1)) . '</pre>';
     if ($n['tag'] == 'cdata') {
       $r = $n['a']['value'];
     }
@@ -214,7 +214,7 @@
   /*  */
   
   function open($p, $t, $a) {
-    //echo "<br />\n".'opening '.$t . ' ' . print_r($a, 1); flush();
+    //echo "<br />\n".'opening '.$t . ' ' . //($a, 1); flush();
     //echo "<br />\n".'opening '.$t; flush();
     $t = strtolower($t);
     /* base check */

Modified: branches/stable/nixtape/utils/arc/store/ARC2_StoreEndpoint.php
===================================================================
--- branches/stable/nixtape/utils/arc/store/ARC2_StoreEndpoint.php      
2009-05-08 21:22:45 UTC (rev 1421)
+++ branches/stable/nixtape/utils/arc/store/ARC2_StoreEndpoint.php      
2009-05-08 21:38:55 UTC (rev 1422)
@@ -223,7 +223,7 @@
     }
     else {
       $this->setHeader('content-type', 'Content-type: text/plain; 
charset=utf-8');
-      $this->result = 'Result serializer not available, dumping raw data:' . 
"\n" . print_r($r, 1);
+      $this->result = 'Result serializer not available, dumping raw data:' . 
"\n" . //($r, 1);
     }
   }
   
@@ -439,7 +439,7 @@
 
   function getPlainSelectResultDoc($r) {
     $this->setHeader('content-type', 'Content-Type: text/plain');
-    return print_r($r['result'], 1);
+    return //($r['result'], 1);
   }
 
   function getHTMLTableSelectResultDoc($r) {

Modified: 
branches/stable/nixtape/utils/arc/store/ARC2_StoreSelectQueryHandler.php
===================================================================
--- branches/stable/nixtape/utils/arc/store/ARC2_StoreSelectQueryHandler.php    
2009-05-08 21:22:45 UTC (rev 1421)
+++ branches/stable/nixtape/utils/arc/store/ARC2_StoreSelectQueryHandler.php    
2009-05-08 21:38:55 UTC (rev 1422)
@@ -649,7 +649,7 @@
       return 1;
     }
     $d_tbls = $this->getDependentJoins($id2);
-    //echo $id . ' :: ' . $id2 . '=>' . print_r($d_tbls, 1);
+    //echo $id . ' :: ' . $id2 . '=>' . //($d_tbls, 1);
     foreach ($d_tbls as $d_tbl) {
       if (preg_match('/^T_' .$id. '\./', $d_tbl)) {
         return 1;
@@ -768,7 +768,7 @@
       $d_joins = $this->getDependentJoins($id);
       $added = array();
       $d_aliases = array();
-      //echo $id . ' =>' . print_r($d_joins, 1);
+      //echo $id . ' =>' . //($d_joins, 1);
       $id_alias = 'T_' . $id . '.s';
       foreach ($d_joins as $alias) {
         if (preg_match('/^(T|V|G)_([0-9\_]+)(_[spo])?\.([a-z\_]+)/', $alias, 
$m)) {

Modified: trunk/nixtape/data/Group.php
===================================================================
--- trunk/nixtape/data/Group.php        2009-05-08 21:22:45 UTC (rev 1421)
+++ trunk/nixtape/data/Group.php        2009-05-08 21:38:55 UTC (rev 1422)
@@ -55,7 +55,7 @@
                        
                        if(PEAR::isError($res)) {
                                header("Content-Type: text/plain");
-                               //print_r($res);
+                               ////($res);
                                
                                exit;
                        }
@@ -227,7 +227,7 @@
                if(PEAR::isError($res))
                {
                        header("Content-Type: text/plain");
-                       //print_r($res);
+                       ////($res);
                        exit;
                }
 
@@ -266,7 +266,7 @@
                
                if(PEAR::isError($res)) {
                        header("Content-Type: text/plain");
-                       //print_r($res);
+                       ////($res);
                        exit;
                }
 

Modified: trunk/nixtape/data/User.php
===================================================================
--- trunk/nixtape/data/User.php 2009-05-08 21:22:45 UTC (rev 1421)
+++ trunk/nixtape/data/User.php 2009-05-08 21:38:55 UTC (rev 1422)
@@ -139,7 +139,7 @@
                
                if(PEAR::isError($res)) {
                        header("Content-Type: text/plain");
-                       print_r($res);
+                       //($res);
                        exit;
                }
 

Modified: trunk/nixtape/delete-profile.php
===================================================================
--- trunk/nixtape/delete-profile.php    2009-05-08 21:22:45 UTC (rev 1421)
+++ trunk/nixtape/delete-profile.php    2009-05-08 21:38:55 UTC (rev 1422)
@@ -28,7 +28,7 @@
        $code = $_GET['code'];
        $res = $mdb2->query("SELECT * FROM Delete_Request WHERE username = 
".$mdb2->quote($username, 'text').' AND code = '.$mdb2->quote($code, 'text'));
        if (PEAR::isError($res)) {
-               print_r($res);
+               //($res);
                exit ;
        }
        if (!$res->numRows()) {

Modified: trunk/nixtape/edit_group.php
===================================================================
--- trunk/nixtape/edit_group.php        2009-05-08 21:22:45 UTC (rev 1421)
+++ trunk/nixtape/edit_group.php        2009-05-08 21:38:55 UTC (rev 1422)
@@ -132,7 +132,7 @@
        if (isset($errors[0]))
        {
                header("Content-Type: text/plain");
-               print_r($errors);
+               //($errors);
                exit;
        }
 }

Modified: trunk/nixtape/user-edit.php
===================================================================
--- trunk/nixtape/user-edit.php 2009-05-08 21:22:45 UTC (rev 1421)
+++ trunk/nixtape/user-edit.php 2009-05-08 21:38:55 UTC (rev 1422)
@@ -126,7 +126,7 @@
        if (isset($errors[0]))
        {
                header("Content-Type: text/plain");
-               print_r($errors);
+               //($errors);
                exit;
        }
 }

Modified: trunk/nixtape/utils/arc/extractors/ARC2_PoshRdfExtractor.php
===================================================================
--- trunk/nixtape/utils/arc/extractors/ARC2_PoshRdfExtractor.php        
2009-05-08 21:22:45 UTC (rev 1421)
+++ trunk/nixtape/utils/arc/extractors/ARC2_PoshRdfExtractor.php        
2009-05-08 21:38:55 UTC (rev 1422)
@@ -103,7 +103,7 @@
     /* new s */
     if ($this->hasClass($n, 'rdf-s')) {
       $lct['next_s'] = array($n['a']['class'], $this->getSubject($n, $lct));
-      //echo "\ns: " . print_r($lct['next_s'], 1);
+      //echo "\ns: " . //($lct['next_s'], 1);
     }
     /* p */
     if ($this->hasClass($n, 'rdf-p') || $this->hasRel($n, 'rdf-p')) {

Modified: trunk/nixtape/utils/arc/extractors/ARC2_RDFExtractor.php
===================================================================
--- trunk/nixtape/utils/arc/extractors/ARC2_RDFExtractor.php    2009-05-08 
21:22:45 UTC (rev 1421)
+++ trunk/nixtape/utils/arc/extractors/ARC2_RDFExtractor.php    2009-05-08 
21:38:55 UTC (rev 1422)
@@ -183,7 +183,7 @@
   }
   
   function getContent($n, $outer = 0, $trim = 1) {
-    //echo '<pre>' . htmlspecialchars(print_r($n, 1)) . '</pre>';
+    //echo '<pre>' . htmlspecialchars(//($n, 1)) . '</pre>';
     if ($n['tag'] == 'comment') {
       $r = '<!-- ' . $n['a']['value'] . ' -->';
     }

Modified: trunk/nixtape/utils/arc/extractors/ARC2_RdfaExtractor.php
===================================================================
--- trunk/nixtape/utils/arc/extractors/ARC2_RdfaExtractor.php   2009-05-08 
21:22:45 UTC (rev 1421)
+++ trunk/nixtape/utils/arc/extractors/ARC2_RdfaExtractor.php   2009-05-08 
21:38:55 UTC (rev 1422)
@@ -27,7 +27,7 @@
   /*  */
   
   function extractRDF() {
-    //echo '<pre>' . htmlspecialchars(print_r($this->nodes, 1)) . '</pre>';
+    //echo '<pre>' . htmlspecialchars(//($this->nodes, 1)) . '</pre>';
     if (!isset($this->caller->detected_formats['rdfa'])) return 0;
     $root_node = $this->getRootNode();
     //$base = $this->v('xml:base', $this->getDocBase(), $root_node['a']);

Modified: trunk/nixtape/utils/arc/parsers/ARC2_AtomParser.php
===================================================================
--- trunk/nixtape/utils/arc/parsers/ARC2_AtomParser.php 2009-05-08 21:22:45 UTC 
(rev 1421)
+++ trunk/nixtape/utils/arc/parsers/ARC2_AtomParser.php 2009-05-08 21:38:55 UTC 
(rev 1422)
@@ -53,7 +53,7 @@
   function addT($t) {
     //if (!isset($t['o_datatype']))
     if ($this->skip_dupes) {
-      //$h = md5(print_r($t, 1));
+      //$h = md5(//($t, 1));
       $h = md5(serialize($t));
       if (!isset($this->added_triples[$h])) {
         $this->triples[$this->t_count] = $t;
@@ -83,7 +83,7 @@
 
   function extractRDF() {
     $index = $this->getNodeIndex();
-    //print_r($index);
+    ////($index);
     $this->rdf = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
     $this->atom = 'http://www.w3.org/2005/atom';
     $this->rss = 'http://purl.org/rss/1.0/';

Modified: trunk/nixtape/utils/arc/parsers/ARC2_CBJSONParser.php
===================================================================
--- trunk/nixtape/utils/arc/parsers/ARC2_CBJSONParser.php       2009-05-08 
21:22:45 UTC (rev 1421)
+++ trunk/nixtape/utils/arc/parsers/ARC2_CBJSONParser.php       2009-05-08 
21:38:55 UTC (rev 1422)
@@ -43,7 +43,7 @@
       /* explicit triples */
       $this->extractResourceRDF($struct, $s);
     }
-    //print_r($struct);
+    ////($struct);
   }
   
   function getStructType($struct, $rel = '') {

Modified: trunk/nixtape/utils/arc/parsers/ARC2_LegacyXMLParser.php
===================================================================
--- trunk/nixtape/utils/arc/parsers/ARC2_LegacyXMLParser.php    2009-05-08 
21:22:45 UTC (rev 1421)
+++ trunk/nixtape/utils/arc/parsers/ARC2_LegacyXMLParser.php    2009-05-08 
21:38:55 UTC (rev 1422)
@@ -142,7 +142,7 @@
   }
   
   function getNodeContent($n, $outer = 0, $trim = 1) {
-    //echo '<pre>' . htmlspecialchars(print_r($n, 1)) . '</pre>';
+    //echo '<pre>' . htmlspecialchars(//($n, 1)) . '</pre>';
     if ($n['tag'] == 'cdata') {
       $r = $n['a']['value'];
     }
@@ -214,7 +214,7 @@
   /*  */
   
   function open($p, $t, $a) {
-    //echo "<br />\n".'opening '.$t . ' ' . print_r($a, 1); flush();
+    //echo "<br />\n".'opening '.$t . ' ' . //($a, 1); flush();
     //echo "<br />\n".'opening '.$t; flush();
     $t = strtolower($t);
     /* base check */

Modified: trunk/nixtape/utils/arc/store/ARC2_StoreEndpoint.php
===================================================================
--- trunk/nixtape/utils/arc/store/ARC2_StoreEndpoint.php        2009-05-08 
21:22:45 UTC (rev 1421)
+++ trunk/nixtape/utils/arc/store/ARC2_StoreEndpoint.php        2009-05-08 
21:38:55 UTC (rev 1422)
@@ -223,7 +223,7 @@
     }
     else {
       $this->setHeader('content-type', 'Content-type: text/plain; 
charset=utf-8');
-      $this->result = 'Result serializer not available, dumping raw data:' . 
"\n" . print_r($r, 1);
+      $this->result = 'Result serializer not available, dumping raw data:' . 
"\n" . //($r, 1);
     }
   }
   
@@ -439,7 +439,7 @@
 
   function getPlainSelectResultDoc($r) {
     $this->setHeader('content-type', 'Content-Type: text/plain');
-    return print_r($r['result'], 1);
+    return //($r['result'], 1);
   }
 
   function getHTMLTableSelectResultDoc($r) {

Modified: trunk/nixtape/utils/arc/store/ARC2_StoreSelectQueryHandler.php
===================================================================
--- trunk/nixtape/utils/arc/store/ARC2_StoreSelectQueryHandler.php      
2009-05-08 21:22:45 UTC (rev 1421)
+++ trunk/nixtape/utils/arc/store/ARC2_StoreSelectQueryHandler.php      
2009-05-08 21:38:55 UTC (rev 1422)
@@ -649,7 +649,7 @@
       return 1;
     }
     $d_tbls = $this->getDependentJoins($id2);
-    //echo $id . ' :: ' . $id2 . '=>' . print_r($d_tbls, 1);
+    //echo $id . ' :: ' . $id2 . '=>' . //($d_tbls, 1);
     foreach ($d_tbls as $d_tbl) {
       if (preg_match('/^T_' .$id. '\./', $d_tbl)) {
         return 1;
@@ -768,7 +768,7 @@
       $d_joins = $this->getDependentJoins($id);
       $added = array();
       $d_aliases = array();
-      //echo $id . ' =>' . print_r($d_joins, 1);
+      //echo $id . ' =>' . //($d_joins, 1);
       $id_alias = 'T_' . $id . '.s';
       foreach ($d_joins as $alias) {
         if (preg_match('/^(T|V|G)_([0-9\_]+)(_[spo])?\.([a-z\_]+)/', $alias, 
$m)) {





reply via email to

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