Your message dated Mon, 12 Mar 2018 12:55:09 +0000
with message-id <e1evmyr-0008jf...@fasolo.debian.org>
and subject line Bug#885688: fixed in sensible-utils 0.0.12
has caused the Debian Bug report #885688,
regarding sensible-utils: sensible-browser launches $BROWSER with empty argument
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
885688: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885688
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: sensible-utils
Version: 0.0.9+deb9u1
Severity: normal
Tags: patch

when environmental variable BROWSER is set to value FOO
(and FOO is i /usr/bin/FOO)

$ sensible-browser
does
execve("/usr/bin/FOO", ["FOO", ""], ...)
execve("/usr/bin/FOO", ["FOO", ""], ...)
instead of
execve("/usr/bin/FOO", ["FOO"], ...)

That is, in sh notation, it does
$ FOO ''
instead of
$ FOO

In particular, it causes firefox to open with a directory listing of
getcwd() instead of its configured start page.

I attach two patches: a minimal patch that uses the same solution as
the rest of the script (maybe good for security update, to correct the
regression introduced by the security update), and a better patch that
also allows passing sensible-browser multiple URLs (maybe good for
sid).

-- System Information:
Debian Release: 9.3
  APT prefers stable
  APT policy: (500, 'stable'), (400, 'testing'), (200, 'unstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_LU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

-- no debconf information
--- sensible-utils-0.0.11/sensible-browser	2017-11-15 16:30:02.000000000 +0100
+++ sensible-utils-0.0.11.foo/sensible-browser	2017-12-29 05:38:26.658192505 +0100
@@ -1,13 +1,11 @@
 #!/bin/sh
 
-URL="$1"
-
 # Prevent recursive loops, where these values are set to this script
 p="$(which sensible-browser)"
 [ "$(which $BROWSER || true)" = "$p" ] && BROWSER=
 
 if test -n "$BROWSER"; then
-    ${BROWSER} "$1"
+    ${BROWSER} "$@"
     ret="$?"
     if [ "$ret" -ne 126 ] && [ "$ret" -ne 127 ]; then
 	exit "$ret"
@@ -17,20 +15,20 @@
 if test -n "$DISPLAY"; then
     if test -n "$GNOME_DESKTOP_SESSION_ID"; then
         if test -x /usr/bin/gnome-www-browser; then
-            exec /usr/bin/gnome-www-browser ${URL:+"$URL"}
+            exec /usr/bin/gnome-www-browser "$@"
         elif test -x /usr/bin/x-www-browser; then
-            exec /usr/bin/x-www-browser ${URL:+"$URL"}
+            exec /usr/bin/x-www-browser "$@"
         elif test -x /usr/bin/gnome-terminal && test -x /usr/bin/www-browser; then
-            exec /usr/bin/gnome-terminal -e "/usr/bin/www-browser ${URL:+\"$URL\"}"
+            exec /usr/bin/gnome-terminal -x /usr/bin/www-browser "$@"
         fi
     fi
     if test -x /usr/bin/x-www-browser; then
-        exec /usr/bin/x-www-browser ${URL:+"$URL"}
+        exec /usr/bin/x-www-browser "$@"
     elif test -x /usr/bin/x-terminal-emulator && test -x /usr/bin/www-browser; then
-        exec /usr/bin/x-terminal-emulator -e /usr/bin/www-browser ${URL:+"$URL"}
+        exec /usr/bin/x-terminal-emulator -x /usr/bin/www-browser "$@"
     fi
 elif test -x /usr/bin/www-browser; then
-    exec /usr/bin/www-browser ${URL:+"$URL"}
+    exec /usr/bin/www-browser "$@"
 fi
 
 printf "Couldn't find a suitable web browser!\n" >&2
--- sensible-browser~	2017-11-15 16:30:02.000000000 +0100
+++ sensible-browser	2017-12-29 05:32:11.183127131 +0100
@@ -7,7 +7,7 @@
 [ "$(which $BROWSER || true)" = "$p" ] && BROWSER=
 
 if test -n "$BROWSER"; then
-    ${BROWSER} "$1"
+    ${BROWSER} ${URL:+"$URL"}
     ret="$?"
     if [ "$ret" -ne 126 ] && [ "$ret" -ne 127 ]; then
 	exit "$ret"

--- End Message ---
--- Begin Message ---
Source: sensible-utils
Source-Version: 0.0.12

We believe that the bug you reported is fixed in the latest version of
sensible-utils, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 885...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bastien Roucari├Ęs <ro...@debian.org> (supplier of updated sensible-utils 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 12 Mar 2018 11:17:53 +0100
Source: sensible-utils
Binary: sensible-utils
Architecture: source
Version: 0.0.12
Distribution: unstable
Urgency: medium
Maintainer: Anibal Monsalve Salazar <ani...@debian.org>
Changed-By: Bastien Roucari├Ęs <ro...@debian.org>
Description:
 sensible-utils - Utilities for sensible alternative selection
Closes: 877553 885688
Changes:
 sensible-utils (0.0.12) unstable; urgency=medium
 .
   * Fix sensible-browser launches $BROWSER with empty argument
     (Closes: #885688)
   * Bug fix: "[INTL:de] updated German man page translation", thanks to
     Helge Kreutzmann (Closes: #877553).
   * Add basic testing.
   * Bump compat and policy (no changes)
Checksums-Sha1:
 4da34aa08e5efcb94e5dd1586efc6c38d206c395 1732 sensible-utils_0.0.12.dsc
 d249c14aed16c6b4a39795aa0e873f87e796a65e 62152 sensible-utils_0.0.12.tar.xz
 323bcd180702ee51e6ded1c9c7c5eaf74eb3e7eb 4334 
sensible-utils_0.0.12_source.buildinfo
Checksums-Sha256:
 1b62cc5f7561b3f5692a6edaec942e2e97e8368dabff8c865867d428eecb1221 1732 
sensible-utils_0.0.12.dsc
 99ba2ebf8c57447c69d426b99b84ff9dc817be0bc4988ec6890a14558c529e2e 62152 
sensible-utils_0.0.12.tar.xz
 9df59f0827c305186d6b3752d18e9be861b49239ae5894c6ad937342cb4a1f38 4334 
sensible-utils_0.0.12_source.buildinfo
Files:
 e074bb86e59ae7f7727f2efb35c7073a 1732 utils required sensible-utils_0.0.12.dsc
 01a70d04eef4e93e000b4a1e6bd50d18 62152 utils required 
sensible-utils_0.0.12.tar.xz
 d23266f590cab64c217d2bdaa77223b0 4334 utils required 
sensible-utils_0.0.12_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEXQGHuUCiRbrXsPVqADoaLapBCF8FAlqmdRAACgkQADoaLapB
CF8hfg//SdG52PF4ptoQjKEwMjzhSn/4N2fYxU6vZ9VXa3UaX5o06p5UwkVBuQfs
cf5mI+3/kshdzwZA8QvHbmEuyLAF0fZdTWf8XEwy1bccMYnF07WSrU3jPvdvlD+B
LAW4Lr3QHLg17JLxJKq79q25blKT9u/Nhf1qbi/zsr+xkPuGZTn3FiZ+sj6lHoqU
lvywMQj/ZbnT3aXMx/+0mZ8AeW8mFydXgnvW3XtaMXoLEleO20q6StrTtPtvvDZz
72oMpyhkgzowPEeh1leWxg6fqOXJK1+yTo7U3aB89gh217g44LMwxbNOCq9h1Si5
OZ4cl7SSS3itVl5PyMkuOqXZF0M9ZOAuWXNaF2/tynkOJIPxAZdmM1HUqp732ECl
EwkZ69e7zH9Hd+YAHD7EeO6Q+QqRKBrxvwO1NVW6wdbi3nTh8HV+WPTBWq7lqb0b
NhtrPtJAHDKo5XaFyzI1LyhvwhUUkBz5oZ/ntj7oEMwhAIiCGdYejg/uMT8FqQCl
V6MoxgJPrDHuhYgt6n/XOhVj1hcP6RCVX9dD0JMbtZwR3YBcj+Ps9xfsg/A4TpL8
ln00qxLyCt1y7eQX0GnRcB6Oq1TeWwYs18Qe+Dz00Nme6Nj2hOrf8vWkKcOqUWWp
JEqgI5nnrtYf8p3VhokfcRhTkuvXAa1bYO6rcBGwug+2fdNnvxg=
=jiv9
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to