[Rt-commit] rt branch, 4.2/installer-escapes, created. rt-4.2.4-21-g8395c19

Alex Vandiver alexmv at bestpractical.com
Tue Nov 18 16:10:44 EST 2014


The branch, 4.2/installer-escapes has been created
        at  8395c1969d646c4698ce5373a61f3e03f7ed3187 (commit)

- Log -----------------------------------------------------------------
commit 8395c1969d646c4698ce5373a61f3e03f7ed3187
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu May 22 17:14:19 2014 -0500

    Installer: Escape quotes and backslases in single-quoted strings
    
    Fixes: I#29990

diff --git a/lib/RT/Installer.pm b/lib/RT/Installer.pm
index c48b06c..2c4050f 100644
--- a/lib/RT/Installer.pm
+++ b/lib/RT/Installer.pm
@@ -288,7 +288,9 @@ sub SaveConfig {
             # remove obsolete settings we'll add later
             $content =~ s/^\s* Set \s* \( \s* \$$_ .*$//xm;
 
-            $content .= "Set( \$$_, '$RT::Installer->{InstallConfig}{$_}' );\n";
+            my $value = $RT::Installer->{InstallConfig}{$_};
+            $value =~ s/(['\\])/\\$1/g;
+            $content .= "Set( \$$_, '$value' );\n";
         }
         $content .= "1;\n";
         print $fh $content;

-----------------------------------------------------------------------


More information about the rt-commit mailing list