Re: eval() == evil? --- How to use it safely?



On Aug 28, 7:57 pm, Paul Rubin <http://phr...@xxxxxxxxxxxxxx> wrote:

So long story short: if I am expecting a dictionary of strings, I
should make a parser that only accepts a dictionary of strings then.
There is no safe way to use an existing construct.

That is what I was afraid of. I know I will have to deal with the
possibility of bad data, but considering my use (an acronym legend for
a database), and the fact that the site I plan to use should be
secure, these issues should be minimal. The users should be able to
spot any obvious false data, and restoring it should be simple.

Many thanks to all of you for your alarmist remarks. I certainly don't
want to, in any way, put my clients computers at risk by providing
unsafe code.

.



Relevant Pages

  • Re: eval() == evil? --- How to use it safely?
    ... if I am expecting a dictionary of strings, ... or use an existing parser for an existing and documented format, as many posters already suggested. ...
    (comp.lang.python)
  • Re: Help me!!
    ... It sounds like a JTextArea would be more appropiate with a 'Parse' ... StringBufferInputStream to wrap it and make it something your parser ... >>You could implement it with a JTable of Strings, ... > I can use the JTable by setting the CellEditor to a JTextField. ...
    (comp.lang.java.gui)
  • Re: [TOMOYO #15 0/8] TOMOYO Linux
    ... Last time I looked it included script parser and some ... alternatives (which basically boil down to nasty binary interfaces) ... performance-critical area, ... always use strings if at all possible and relevant. ...
    (Linux-Kernel)
  • Re: Writing a Parser
    ... >> had trouble with. ... But basically identifying STRING type tokens by ... strings looks ok and a short test program like ... So I guess it must be something parser related. ...
    (comp.unix.programmer)
  • Re: eval() == evil? --- How to use it safely?
    ... should make a parser that only accepts a dictionary of strings then. ... So I figure an encrypting is needed, ... a real fix should fix the underlying cause. ...
    (comp.lang.python)