Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: how to read conf file in perl script

by afoken (Chancellor)
on Oct 20, 2009 at 12:23 UTC ( [id://802210]=note: print w/replies, xml ) Need Help??


in reply to Re: how to read conf file in perl script
in thread how to read conf file in perl script

Really worse old news: requireing configuration files opens a gapping security hole. Don't do that!

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^3: how to read conf file in perl script
by Anonymous Monk on Oct 21, 2009 at 10:01 UTC
    CPAN does it, CPANPLUS does it, even schwern does it :p

      Do you follow millions of lemmings jumping of the cliff just because "everyone's doin' it"?

      I do not think that using an unlimited Perl parser as a configuration file parser is a good idea. On properly administrated Unix systems, the critical configuration files of CPAN and CPANPLUS should be writeable only for root. So if one can manipulate those files, perl and CPAN/CPANPLUS are your least problem.

      On a typical Windows system with, for example, Strawberry Perl, EVERY user including the guest account can change the configuration files.

      JSON, classic INI files, YAML, and even XML do not have this security problem. A malicious user can modify those files, make the application break, but he will not be able to run arbitary code (unless there's another bug in the application or one of the libraries used).

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://802210]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-19 13:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found