I extracted a patch file from the commit you mentioned at
https://salsa.debian.org/chromium-team/chromium/-/commit/e8b6bbd59aadf18e41ee98841da7fc4783036957
and applied it in our environment.
The patch seems to be working correctly. At least for our use case, the
--user-agent flag, it does not cause any further problems.
Let me know if you need any additional information.
Andres Salomon schreef op 2024-05-23 20:05:
Can you please test out the following patch?
https://salsa.debian.org/chromium-team/chromium/-/commit/e8b6bbd59aadf18e41ee98841da7fc4783036957
The easiest way to test would probably be to manually edit
/usr/bin/chromium, and cut/paste the changes that are reflected in that
commit for the debian/scripts/chromium file.
On 5/23/24 12:42, Andres Salomon wrote:
Thanks for the heads up. While I work on fixing this, a temporary
workaround you can use is ' -- ' before --user-agent. Eg,
chromium --headless --no-sandbox -- --user-agent="Mozilla/5.0
(Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/41.0.2227.1 Safari/537.36"
On 5/23/24 07:11, Remco de Man wrote:
Package: chromium
Version: 125.0.6422.76-1~deb12u1
Severity: normal
Dear Maintainer,
When running 125.0.6422.76-1~deb12u1, when passing arguments to the
chromium
wrapper script included in the Debian package, not all arguments are
passed
correctly to the Chromium binary.
This happens especially when the arguments need any type of quoting,
like
in the case of passing a custom User-Agent with --user-agent.
A minimal reproduction sample for me is running the following
command:
chromium --headless --no-sandbox --user-agent="Mozilla/5.0
(Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/41.0.2227.1 Safari/537.36"
It seems that because the user agent contains spaces, this is not
correctly
passed to the chromium binary. The regression was not present in the
previous
security release, 125.0.6422.60-1~deb12u1, and seems to be caused by
change
https://salsa.debian.org/chromium-team/chromium/-/commit/dc792dc4f3bfdd3e00f5fe7b7bf314077ed301bb
Because of this, many of our headless usage scenarios do not work
correctly
anymore, since Chromium exits with the 'Multiple targets are not
supported'
message, because it parses some of the user agent as seperate
arguments to
its binary.
Seems like the wrapper script should be patched to handle this
scenario,
or the change should be reverted.
-- System Information:
Debian Release: 12.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'),
(500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.82 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
(ignored: LC_ALL set to en_US.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
Versions of packages chromium depends on:
ii chromium-common 125.0.6422.76-1~deb12u1
ii libasound2 1.2.8-1+b1
ii libatk-bridge2.0-0 2.46.0-5
ii libatk1.0-0 2.46.0-5
ii libatomic1 12.2.0-14
ii libatspi2.0-0 2.46.0-5
ii libc6 2.36-9+deb12u7
ii libcairo2 1.16.0-7
ii libcups2 2.4.2-3+deb12u5
ii libdav1d6 1.0.0-2+deb12u1
ii libdbus-1-3 1.14.10-1~deb12u1
ii libdouble-conversion3 3.2.1-1
ii libdrm2 2.4.114-1+b1
ii libevent-2.1-7 2.1.12-stable-8
ii libexpat1 2.5.0-1
ii libflac12 1.4.2+ds-2
ii libfontconfig1 2.14.1-4
ii libfreetype6 2.12.1+dfsg-5
ii libgbm1 22.3.6-1+deb12u1
ii libgcc-s1 12.2.0-14
ii libglib2.0-0 2.74.6-2+deb12u2
ii libgtk-3-0 3.24.38-2~deb12u1
ii libharfbuzz-subset0 6.0.0+dfsg-3
ii libharfbuzz0b 6.0.0+dfsg-3
ii libjpeg62-turbo 1:2.1.5-2
ii libjsoncpp25 1.9.5-4
ii liblcms2-2 2.14-2
ii libminizip1 1.1-8+deb12u1
ii libnspr4 2:4.35-1
ii libnss3 2:3.87.1-1
ii libopenh264-7 2.3.1+dfsg-3
ii libopenjp2-7 2.5.0-2
ii libopus0 1.3.1-3
ii libpango-1.0-0 1.50.12+ds-1
ii libpng16-16 1.6.39-2
ii libpulse0 16.1+dfsg1-2+b1
ii libsnappy1v5 1.1.9-3
ii libstdc++6 12.2.0-14
ii libwoff1 1.0.2-2
ii libx11-6 2:1.8.4-2+deb12u2
ii libxcb1 1.15-1
ii libxcomposite1 1:0.4.5-1
ii libxdamage1 1:1.1.6-1
ii libxext6 2:1.3.4-1+b1
ii libxfixes3 1:6.0.0-2
ii libxkbcommon0 1.5.0-1
ii libxml2 2.9.14+dfsg-1.3~deb12u1
ii libxnvctrl0 525.85.05-3~deb12u1
ii libxrandr2 2:1.5.2-2+b1
ii libxslt1.1 1.1.35-1
ii zlib1g 1:1.2.13.dfsg-1
Versions of packages chr