Bug 503047 - Missing quoting in mimic_gnome_open
Missing quoting in mimic_gnome_open
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: htmlview (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: Christopher Aillon
Fedora Extras Quality Assurance
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-28 10:39 EDT by Mads Kiilerich
Modified: 2010-11-04 07:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-04 07:55:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mads Kiilerich 2009-05-28 10:39:07 EDT
Description of problem:

$ su -
# xdg-open 'http://foo/bar baz'
/usr/bin/htmlview: line 75: [: http://foo/bar: binary operator expected


Version-Release number of selected component (if applicable):

htmlview-4.0.0-5.fc11.noarch
Comment 1 Matěj Cepl 2009-06-01 18:16:54 EDT
Space is not allowed as part of URL, so we shouldn't protect it. When the space character is properly encoded (as %20), the script works as expected.
Comment 2 Christopher Aillon 2009-06-01 19:59:31 EDT
I'm fairly certain we should handle this and the bug is not actually invalid.  However, it's not clear what the desired behaviour is.

Among other things, RFC 3986 says

   For robustness, software that accepts user-typed URI should attempt
   to recognize and strip both delimiters and embedded whitespace.

Based on other reading of RFC 3986 and referencing RFC 2396 as well, I can see valid behaviour being either of the following:

  * Treat the whitespace as delimiter, and recognize input as an attempt to load
      BOTH 'http://foo/bar' AND 'baz' (in separate tabs/windows/processes)
    However, since xdg-open only supports one URI at a time, we would actually
    only attempt to load 'http://foo/bar'
  * Treat the whitespace as an embedded character and encode it, so we load
     'http://foo/bar%20baz'

I think the first behaviour is arguably "more correct" per the spec, but perhaps less intuitive to a user.
Comment 3 Mads Kiilerich 2009-06-02 19:49:04 EDT
As naive user I would expect xdg-open to take whatever I write, determine the right opener, and pass exactly what I wrote through to it. Some openers might support spaces, some doesn't, but I don't expect xdg-open to do anything regarding that. Also no percent-encoding.

That is also how it works when gnome is available, but not in a limited environment as the one provided by "su -".

It would be fine if xdg-open could open multiple files/urls if it is handed multiple argv's. But it would be surprising and annoying if it parsed and splitted an argument.

IMHO
Comment 4 Bug Zapper 2009-06-09 12:43:44 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Mads Kiilerich 2010-01-13 18:15:47 EST
Same problem with htmlview-4.0.0-6.fc12.noarch
Comment 6 Bug Zapper 2010-11-04 07:12:03 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Mads Kiilerich 2010-11-04 07:55:57 EDT
Seems to be solved in f14

Note You need to log in before you can comment on or make changes to this bug.