[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2022-11-18 Thread Nathan Pratta Teodosio
My proposed fix to Chromium start-up script wasn't foolproof. One can
naturally also export CHROMIUM_FLAGS instead of defining it in
~/chromium.init.

Passing arguments via a variable is a bad idea if one wants both to be
reliable with odd input (i.e. accept arguments with spaces (as in the
bug report), newlines etc.) and also to be portable, accepting the
variable as environment or by sourcing it from a script such as
~/chromium.init.

It's no coincidence that all programs — correct me if I'm wrong — that
do allow that kind of thing either don't offer arguments with spaces
(less) or allow only one argument per variable (quilt, git, reportbug).

So I'm reverting it and changing the script to detect if CHROMIUM_FLAGS
is being used and has any space, then warn on stderr that it will fail
for arguments that contain space.

** Changed in: chromium-browser (Ubuntu)
   Status: Fix Released => Won't Fix

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Won't Fix

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2022-10-21 Thread Nathan Teodosio
** Changed in: chromium-browser (Ubuntu)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Fix Released

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2022-09-20 Thread Nathan Teodosio
** Changed in: chromium-browser (Ubuntu)
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Fix Committed

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2022-09-20 Thread Nathan Teodosio
** Changed in: chromium-browser (Ubuntu)
   Status: Triaged => In Progress

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Fix Committed

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2022-09-19 Thread Nathan Teodosio
When a string is put in a shell variable, white-space loses its
syntactical information.

Merely quoting $CHROMIUM_FLAGS in the launcher won't do, since we rely
on word splitting to split arguments, as noted in #3.

The launcher has a #!/bin/sh shebang, so it's meant as a POSIX compliant
shell script. As such, we don't have access to arrays, which are a Korn
shell extension, _except_ for the argument list, which can be used as
one.

So I see two reasonable options here, and both are backwards-compatible,
i.e., won't upset users who are fine with the current state of
CHROMIUM_FLAGS.

>> OPTION 1 (already works in the current state of things) <<

Leave the launcher alone and instead instruct the user to abandon
CHROMIUM_FLAGS and take advantage of the argument list by writing this
~/.chromium-browser.init:

  set -- --enable-logging=stderr --user-agent='A B C' "$@"

>> OPTION 2 <<

Make these changes in the launcher:

  #!/bin/sh -> #!/bin/bash
  CHROMIUM_FLAGS -> "${CHROMIUM_FLAGS[@]}"

Then ~/.chromium-browser.init would allow for arrays whose elements can
contain spaces:

  CHROMIUM_FLAGS=(--enable-logging=stderr --user-agent="A B C")

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Triaged

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2022-09-19 Thread Nathan Teodosio
** Changed in: chromium-browser (Ubuntu)
 Assignee: (unassigned) => Nathan Teodosio (nteodosio)

** Tags removed: patch

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Triaged

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2022-09-19 Thread Nathan Teodosio
** Changed in: chromium-browser (Ubuntu)
   Status: Confirmed => Triaged

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Triaged

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2018-03-09 Thread Olivier Tilloy
** Changed in: chromium-browser (Ubuntu)
 Assignee: Chad Miller (cmiller) => (unassigned)

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Confirmed

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2017-04-26 Thread Olivier Tilloy
** Changed in: chromium-browser (Ubuntu)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Confirmed

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2015-11-22 Thread Miyuki Taniguchi
Space characters in chromium flags seem to be always parsed even if
they are escaped. (Of course, it must be a bug.)

 When splitting all flags in $CHROMIUM_FLAGS by newline and running chromium 
after IFS=$'\n' , it works.
(And do not escape spaces. like --user-agent=foo bar , not --user-agent="foo 
bar" or --user-agent=foo\ bar .)

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Confirmed

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2015-11-10 Thread Iuri Chaer
Uh, I've tried that, but it keeps splitting the argument values no
matter how many slashes I add (they end up interpreted as part of the
URL -- for instance, instead of "B" chromium gives me "B/" in the
address bar). I've been trying to understand what bash is doing, but
it's really eluding me.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Confirmed

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


Re: [Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2015-11-10 Thread Chad Miller
I agree that it's tricky.

The two solutions I can think of is your idea of an array, and assumption
that the variable should go through two levels of interpretation.

The way that makes current scripts and files still work is the latter. It
would go like this:

If there is a special character in the output, it must be quoted or
escaped. Then, special characters must be escaped again.

So, instead of

CHROMIUM_FLAGS="--foo --bar=one\ two"

it would be

CHROMIUM_FLAGS="--foo --bar=one\\\ two"


So, you should be able to


CHROMIUM_FLAGS="--user-agent=Mozilla\\\ 9.0\\\ not\\\ really
--user-data-dir=/path/with/a\\\ space"


On first interpretation, those backslash-character values are interpreted:
backslashbackslash becomes a backslash, and backslashspace becomes a space.

On second interpretation, the one that runs the program, backslashspace is
a space, but not a space that separates parameters. A literal space.

It's not pretty, I know.


On Tue, Nov 10, 2015 at 8:59 AM, Iuri Chaer 
wrote:

> I noticed that last night =( so sad how often I seem to be surprised by
> how shell expansion works.
>
> Best I could come up with was transform CHROMIUM_FLAGS into an array and
> use "${CHROMIUM_FLAGS[@]}" in the calls instead. Sorry for the failed
> patch attempt.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1514484
>
> Title:
>   Chromium start-up script doesn't accept argument values with spaces in
>   $CHROMIUM_FLAGS, cause is lack of quotes
>
> Status in chromium-browser package in Ubuntu:
>   Confirmed
>
> Bug description:
>   You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
>   comes after the first space is going to be interpreted as an URL by
>   the actual chromium binary. Easy repro:
>
>   1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
>   $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init
>
>   2. Run chromium:
>   $ /usr/bin/chromium-browser
>
>   3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.
>
>   The cause for this funny behavior is the lack of quotes around
>   $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
>   -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
>   script. I've tried working around it but couldn't, no amount of
>   escaping and extra quotes seems to help if it's called like that.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions
>

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Confirmed

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2015-11-10 Thread Iuri Chaer
I noticed that last night =( so sad how often I seem to be surprised by
how shell expansion works.

Best I could come up with was transform CHROMIUM_FLAGS into an array and
use "${CHROMIUM_FLAGS[@]}" in the calls instead. Sorry for the failed
patch attempt.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Confirmed

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2015-11-09 Thread Ubuntu Foundations Team Bug Bot
The attachment "Patch adding quotes to /usr/bin/chromium-browser" seems
to be a patch.  If it isn't, please remove the "patch" flag from the
attachment, remove the "patch" tag, and if you are a member of the
~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  New

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1514484] Re: Chromium start-up script doesn't accept argument values with spaces in $CHROMIUM_FLAGS, cause is lack of quotes

2015-11-09 Thread Chad Miller
I don' think this patch does what you expect.

Try with more than one value in the variable.

CHROMIUM_FLAGS='--user-data-dir=/tmp/cr  --user-agent="A B C"'

** Changed in: chromium-browser (Ubuntu)
 Assignee: (unassigned) => Chad Miller (cmiller)

** Changed in: chromium-browser (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1514484

Title:
  Chromium start-up script doesn't accept argument values with spaces in
  $CHROMIUM_FLAGS, cause is lack of quotes

Status in chromium-browser package in Ubuntu:
  Confirmed

Bug description:
  You can't have arguments with spaces inside CHROMIUM_FLAGS, whatever
  comes after the first space is going to be interpreted as an URL by
  the actual chromium binary. Easy repro:

  1. Set user's CHROMIUM_FLAGS with an argument containing spaces, eg:
  $ echo 'CHROMIUM_FLAGS=--user-agent="A B C"' > .chromium-browser.init

  2. Run chromium:
  $ /usr/bin/chromium-browser

  3. See 2 extra open tabs, one trying to open URL 'B', the other 'C'.

  The cause for this funny behavior is the lack of quotes around
  $CHROMIUM_FLAGS in the script installed in /usr/bin/chromium-browser
  -- it calls $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" by the end of the
  script. I've tried working around it but couldn't, no amount of
  escaping and extra quotes seems to help if it's called like that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp