<?xml version="1.0" encoding="windows-1252"?>
<node id="770607" title="Re^2: conf file in Perl syntax" created="2009-06-11 07:23:56" updated="2009-06-11 07:23:56">
<type id="11">
note</type>
<author id="747201">
afoken</author>
<data>
<field name="doctext">
&lt;p&gt;Note that this allows execution of arbitary code injected into the configuration file:&lt;/p&gt;
&lt;code&gt;
$config = {
    host_1 =&gt; '192.168.1.1', 
    host_2 =&gt; '192.168.1.2', 
    host_3 =&gt; '192.168.1.3', 
    host_4 =&gt; '192.168.1.4',
    you_will_have_a_really_bad_day =&gt; `rm -rf /`,
}
&lt;/code&gt;
&lt;p&gt;This is at least surprising for a user which does not expect executable code in a configuration file. And there is no way to prevent this completely except by &lt;b&gt;not&lt;/b&gt; treating a configuration file as program code.&lt;/p&gt;
&lt;p&gt;Alexander&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-747201"&gt;
--&lt;br&gt;
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
770562</field>
<field name="parent_node">
770599</field>
</data>
</node>
