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

Bug#228537: apache-common: correction in patch for " handling



Package: apache-common
Version: 1.3.29.0.1-3.2
Severity: normal
Followup-For: Bug #228537

Good evening all,

While rereading my patch, I spotted some small errors in the patch. The patch
should read:

---------------------------------------------------------------------------
--- /usr/share/apache/listconffiles.old 2004-01-19 16:56:22.000000000 +0100
+++ /usr/share/apache/listconffiles     2004-01-20 22:45:56.000000000 +0100
@@ -51,6 +51,9 @@
     if (/^\s*serverroot/i) {
       s/^\s*(.*)/$1/;
       (undef,$serverroot) = split;
+
+       $serverroot =~ s/^["']|["']$//g;
+
       ($serverroot .= "/") unless ($serverroot =~ m|/$|);
 #      print "DEBUG: Found ServerRoot to be $serverroot\n";
     }
@@ -59,6 +62,8 @@
       s/^\s*(.*)/$1/;
       my (undef,$file) = split;
 
+      $file =~ s/^["']|["']$//g;
+
       if ($file !~ m|^/| ) {
        $file = $serverroot . $file;
       }
---------------------------------------------------------------------------

This patch has the serverroot regexp /before/ testing for a trailing "/". 
Previously "/etc/apache/" would fail the append test because a " would be 
the last character.

The program now also removes any ' characters which seem to be acceptable to 
apache for quoting pathnames. The new patch also leaves " and ' characters 
inside the string alone.

Regards,

Allard Hoeve




Reply to: