rst.el does not handle spaces in filenames correctly

Bug #579252 reported by perlhead
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-docutils (Debian)
Fix Released
Unknown
python-docutils (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-docutils

The function rst-compile fails to quote filenames before invoking the command, which results in the shell interpreting the filename as multiple arguments. The attached patch fixes it.

Tags: patch
Revision history for this message
perlhead (fheinz) wrote :
Revision history for this message
Jakub Wilk (jwilk) wrote : Re: [Bug 579252] [NEW] rst.el does not handle spaces in filenames correctly

* perlhead <email address hidden>, 2010-05-12, 11:28:
>The function rst-compile fails to quote filenames before invoking the
>command, which results in the shell interpreting the filename as
>multiple arguments. The attached patch fixes it.

Your patch doesn't cope with other special characters like ", ` or $.
The correct solution would be to use shell-quote-argument.

--
Jakub Wilk

Revision history for this message
perlhead (fheinz) wrote :

Jakub,

Indeed, my solution was too simplistic. I attached a better patch, using shell-quote-argument (thanks for the pointer!)

Changed in python-docutils (Debian):
status: Unknown → Confirmed
Changed in python-docutils (Debian):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-docutils - 0.6-4

---------------
python-docutils (0.6-4) unstable; urgency=low

  * Bump standards version to 3.8.4 (no changes needed).
  * Bump debhelper compatibility level to 7 (no changes needed). Update
    versioned build-dependency on debhelper accordingly.
  * Use unversioned build-dependency on python-setuptools, as the requested
    version is available even in oldstable.
  * Update my e-mail address.
  * Drop build-dependency on xsltproc; it's no longer used.
  * Run tests at build time:
    + Modify debian/rules accordingly.
    + Build-depend on python-all.
    + Apply patch from upstream (alltests-exitcode.diff) to make test suite
      runner exit with code 0 if all test passes.
  * Emacs major mode: properly quote arguments passed to shell
    (closes: #581522, LP: #579252).
  * Install HISTORY.txt as the upstream changelog.
 -- Ubuntu Archive Auto-Sync <email address hidden> Sat, 15 May 2010 08:10:57 +0100

Changed in python-docutils (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.