I don't know if anyone has attacked me - attackers are
pretty lazy and stupid these days, with so many targets,
such easy pickings, and such apathy towards the Web in
general - but I trust it in production. Though I
could be sealing my fate here. Oh well. I also backup,
compartmentalize, and run bounds checking patches.
Actually, I don't use Safe.pm - I use it's bastard cousin,
ops.pm:
http://perldesignpatterns.com/?self
use ops qw(:default entereval sort exit rand ftsize ftfile caller stat
+);
The Internet community at large is allowed to write code
to extend TinyWiki. It is useful to understand the
way these modules work - for that, read the Opcode
manual page. A bitmask is maintained and disallowed
ops aren't compiled. Any code compiled before the "use ops"
line can do anything it wants, but any code compiled
after it - including in evals - cannot compile down to
anything that uses any opcode deemed unsafe. This
industrial strength approach avoids a lot (most?) of the
problems with Safe - but then your module would be
dropping permissions permenantly so that unsafe things
don't appear in config files. On one hand, drop as much
priviledge as early as possible. On the other, don't
invite disaster - like me. Use YAML or XML or SGML or
... something.
I hope this amuses and/or helps.
-scott
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.