[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] [BUG] [Babel] Quotes-in-strings not being escaped in pytho
Christopher Allan Webber
Re: [Orgmode] [BUG] [Babel] Quotes-in-strings not being escaped in python, breaking output
Tue, 09 Nov 2010 16:34:19 -0600
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
I worry about this a bit because of the possible security issue: the
ability to execute arbitrary code, since the structure that gets
constructed is eval'ed.
return [['607', 'Show license short name on the deed'],
['255', "'))(message (concat 'hello ' 'world"]]
That constructs a set of listp objects which are evaluated and look
'(("607" "Show license short name on the deed") ("255" ""))
(message (concat "hello " "world"))
It doesn't seem like the second one is being evaluated but it makes me
nervous that it's being passed through eval like this at all.
Christopher Allan Webber <address@hidden> writes:
> It looks like \' and " are not being escaped in
> org-babel-python-table-or-string, which is the problem.
> Christopher Allan Webber <address@hidden> writes:
>> Strings with quotes in them aren't having the inner quotes escaped right
>> while read by ob-python in python. Example:
>> #+BEGIN_SRC python
>> return [['607', 'Show license short name on the deed'],
>> ['255', '"Smart" 404 pages']]
>> | 607 | Show license short name on the deed | | |
>> | 255 | | Smart | 404 pages |
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.