[PATCH] gnu: librewolf: Add %u to Exec option to open URLs.

  • Open
  • quality assurance status badge
Details
3 participants
  • Ian Eure
  • André Batista
  • Roman Scherer
Owner
unassigned
Submitted by
Roman Scherer
Severity
normal
R
R
Roman Scherer wrote 2 days ago
(address . guix-patches@gnu.org)(name . Roman Scherer)(address . roman@burningswell.com)
dd246aacd5131efa0133601d89dc0f63479ab035.1733138991.git.roman@burningswell.com
* gnu/packages/librewolf.scm (librewolf): Add %u to Exec option to open URLs.

Change-Id: I8cf5d3886eaf7805209cf12eae0cc875bef6d5dd
---
gnu/packages/librewolf.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm
index 5d432cfad8..42d212e9f9 100644
--- a/gnu/packages/librewolf.scm
+++ b/gnu/packages/librewolf.scm
@@ -605,7 +605,7 @@ (define-public librewolf
(substitute* desktop-file
(("^Exec=@MOZ_APP_NAME@")
(string-append "Exec="
- #$output "/bin/librewolf"))
+ #$output "/bin/librewolf %u"))
(("@MOZ_APP_DISPLAYNAME@")
"LibreWolf")
(("@MOZ_APP_REMOTINGNAME@")

base-commit: 2756c660fb2d9e2fe3e1fd0898e4d7038c8273c7
--
2.46.0
A
A
André Batista wrote 2 days ago
(name . Roman Scherer)(address . roman@burningswell.com)
Z03EuKjzXIjcte6_@andel
Hi Roman,

seg 02 dez 2024 �s 13:20:20 (1733156420), roman@burningswell.com enviou:
Toggle quote (20 lines)
> * gnu/packages/librewolf.scm (librewolf): Add %u to Exec option to open URLs.
>
> Change-Id: I8cf5d3886eaf7805209cf12eae0cc875bef6d5dd
> ---
> gnu/packages/librewolf.scm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm
> index 5d432cfad8..42d212e9f9 100644
> --- a/gnu/packages/librewolf.scm
> +++ b/gnu/packages/librewolf.scm
> @@ -605,7 +605,7 @@ (define-public librewolf
> (substitute* desktop-file
> (("^Exec=@MOZ_APP_NAME@")
> (string-append "Exec="
> - #$output "/bin/librewolf"))
> + #$output "/bin/librewolf %u"))
> (("@MOZ_APP_DISPLAYNAME@")
>

This was its previous state and was removed on commit
280aa6b57d7b741a7d8b076e1afa3dff23569332. See also #74070.

Copying Ian, who was the author of that change and has been maintaining
Librewolf.

Cheers!
R
R
Roman Scherer wrote 2 days ago
(name . André Batista)(address . nandre@riseup.net)
875xo2f6ii.fsf@burningswell.com
André Batista <nandre@riseup.net> writes:

Hi André,

thanks for taking a look. So this is fixing a security issue? Which one
exactly? Is it this one?

CVE-2024-10462: Origin of permission prompt could be spoofed by long URL

Are we planning todo the same for Icecat? If so, could we have a variant
of the browsers in Guix that are less hardened, and would allow opening
URLs?

I'm using Slack via Flatpack and not being able to open URLs from there
or other applications with my browser is a bit tedious.

Roman

Toggle quote (30 lines)
> Hi Roman,
>
> seg 02 dez 2024 às 13:20:20 (1733156420), roman@burningswell.com enviou:
>> * gnu/packages/librewolf.scm (librewolf): Add %u to Exec option to open URLs.
>>
>> Change-Id: I8cf5d3886eaf7805209cf12eae0cc875bef6d5dd
>> ---
>> gnu/packages/librewolf.scm | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm
>> index 5d432cfad8..42d212e9f9 100644
>> --- a/gnu/packages/librewolf.scm
>> +++ b/gnu/packages/librewolf.scm
>> @@ -605,7 +605,7 @@ (define-public librewolf
>> (substitute* desktop-file
>> (("^Exec=@MOZ_APP_NAME@")
>> (string-append "Exec="
>> - #$output "/bin/librewolf"))
>> + #$output "/bin/librewolf %u"))
>> (("@MOZ_APP_DISPLAYNAME@")
>>
>
> This was its previous state and was removed on commit
> 280aa6b57d7b741a7d8b076e1afa3dff23569332. See also #74070.
>
> Copying Ian, who was the author of that change and has been maintaining
> Librewolf.
>
> Cheers!
-----BEGIN PGP SIGNATURE-----

iQFLBAEBCAA1FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmdN0kUXHHJvbWFuQGJ1
cm5pbmdzd2VsbC5jb20ACgkQPdpSUn0qwZlASwf8CMD/lp/OwjK1bl7uziR4T/L1
K+Wz73gqqMYtdDaEnLJCqrScfLmZoX9MSamstMykEhWBa1KflyUjtcsqg/BEfTrV
ILZmzFZ3dWr5XDZxBKlVvkJ34UxujnFdgDkSEjbH8d+SYt3dtMKdkl6LARlm/kIY
vhCqk1w5sFTETODbSAd3IjOm5HTbIYqtApC7UUeYhN4l6mmFrUt0UJnfXtBkFiV6
AkF4BjuZjuPxzLHsqL+Vh6mHGGMcpe9ELdkKrmHIK19S6BfUOZHv2pJRagtpJslk
uGUw+xrfNLNdY7g+tV75W8r+0RhapIFm0iEX1KJWysFkDlmJCbC5YyL82lpU8w==
=KYpL
-----END PGP SIGNATURE-----

I
I
Ian Eure wrote 2 days ago
(name . Roman Scherer)(address . roman@burningswell.com)
87cyiam4iz.fsf@retrospec.tv
Hi Roman, André,

Roman Scherer <roman@burningswell.com> writes:

Toggle quote (9 lines)
> André Batista <nandre@riseup.net> writes:
>
> Hi André,
>
> thanks for taking a look. So this is fixing a security issue?
> Which one
> exactly? Is it this one?
>

This isn’t a security issue, the concern was created in a change
which also had security updates. The current nature of the
browser ecosystem means nearly every Firefox update contains
security fixes, so presence of them isn’t a very useful signal.

Toggle quote (37 lines)
>
>> Hi Roman,
>>
>> seg 02 dez 2024 às 13:20:20 (1733156420),
>> roman@burningswell.com enviou:
>>> * gnu/packages/librewolf.scm (librewolf): Add %u to Exec
>>> option to open URLs.
>>>
>>> Change-Id: I8cf5d3886eaf7805209cf12eae0cc875bef6d5dd
>>> ---
>>> gnu/packages/librewolf.scm | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/gnu/packages/librewolf.scm
>>> b/gnu/packages/librewolf.scm
>>> index 5d432cfad8..42d212e9f9 100644
>>> --- a/gnu/packages/librewolf.scm
>>> +++ b/gnu/packages/librewolf.scm
>>> @@ -605,7 +605,7 @@ (define-public librewolf
>>> (substitute* desktop-file
>>> (("^Exec=@MOZ_APP_NAME@")
>>> (string-append "Exec="
>>> - #$output
>>> "/bin/librewolf"))
>>> + #$output
>>> "/bin/librewolf %u"))
>>> (("@MOZ_APP_DISPLAYNAME@")
>>>
>>
>> This was its previous state and was removed on commit
>> 280aa6b57d7b741a7d8b076e1afa3dff23569332. See also #74070.
>>
>> Copying Ian, who was the author of that change and has been
>> maintaining
>> Librewolf.
>>

The context behind this change is that Firefox used to ship a
taskcluster/docker/firefox-snap/firefox.desktop file which had an
Exec line like this:

Exec=@MOZ_APP_NAME@ %u

The Guix package would use that file, replacing the token with the
path to the binary. The presence of %u in the package definition
is because the substitute* regexp is sloppy and replaces the whole
line instead of @MOZ_APP_NAME@ only. For reasons unknown to me,
Firefox stopped shipping this file and deleted it from their repo.
I looked around the repo and found
toolkit/mozapps/installer/linux/rpm/mozilla.desktop, for the rpm
package. Its Exec line is:

Exec=@MOZ_APP_NAME@

So I updated the package to use that, and the regexp to match.

The patch in #74648 looks fine to me, and I think it should be
pushed.

Thanks,

— Ian
R
R
Roman Scherer wrote 34 hours ago
(name . Ian Eure)(address . ian@retrospec.tv)
87zflddsfa.fsf@burningswell.com
Ian Eure <ian@retrospec.tv> writes:

Ok, thanks for the summary Ian. Looking forward for the patch to be
applied.

Thanks, Roman.

Toggle quote (79 lines)
> Hi Roman, André,
>
> Roman Scherer <roman@burningswell.com> writes:
>
>> André Batista <nandre@riseup.net> writes:
>>
>> Hi André,
>>
>> thanks for taking a look. So this is fixing a security issue? Which
>> one
>> exactly? Is it this one?
>>
>
> This isn’t a security issue, the concern was created in a change which
> also had security updates. The current nature of the browser
> ecosystem means nearly every Firefox update contains security fixes,
> so presence of them isn’t a very useful signal.
>
>>
>>> Hi Roman,
>>>
>>> seg 02 dez 2024 às 13:20:20 (1733156420), roman@burningswell.com
>>> enviou:
>>>> * gnu/packages/librewolf.scm (librewolf): Add %u to Exec option to
>>>> open URLs.
>>>>
>>>> Change-Id: I8cf5d3886eaf7805209cf12eae0cc875bef6d5dd
>>>> ---
>>>> gnu/packages/librewolf.scm | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/gnu/packages/librewolf.scm
>>>> b/gnu/packages/librewolf.scm
>>>> index 5d432cfad8..42d212e9f9 100644
>>>> --- a/gnu/packages/librewolf.scm
>>>> +++ b/gnu/packages/librewolf.scm
>>>> @@ -605,7 +605,7 @@ (define-public librewolf
>>>> (substitute* desktop-file
>>>> (("^Exec=@MOZ_APP_NAME@")
>>>> (string-append "Exec="
>>>> - #$output
>>>> "/bin/librewolf"))
>>>> + #$output
>>>> "/bin/librewolf %u"))
>>>> (("@MOZ_APP_DISPLAYNAME@")
>>>>
>>>
>>> This was its previous state and was removed on commit
>>> 280aa6b57d7b741a7d8b076e1afa3dff23569332. See also #74070.
>>>
>>> Copying Ian, who was the author of that change and has been
>>> maintaining
>>> Librewolf.
>>>
>
> The context behind this change is that Firefox used to ship a
> taskcluster/docker/firefox-snap/firefox.desktop file which had an Exec
> line like this:
>
> Exec=@MOZ_APP_NAME@ %u
>
> The Guix package would use that file, replacing the token with the
> path to the binary. The presence of %u in the package definition is
> because the substitute* regexp is sloppy and replaces the whole line
> instead of @MOZ_APP_NAME@ only. For reasons unknown to me, Firefox
> stopped shipping this file and deleted it from their repo. I looked
> around the repo and found
> toolkit/mozapps/installer/linux/rpm/mozilla.desktop, for the rpm
> package. Its Exec line is:
>
> Exec=@MOZ_APP_NAME@
>
> So I updated the package to use that, and the regexp to match.
>
> The patch in #74648 looks fine to me, and I think it should be pushed.
>
> Thanks,
>
> — Ian
-----BEGIN PGP SIGNATURE-----

iQFLBAEBCAA1FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmdOz9oXHHJvbWFuQGJ1
cm5pbmdzd2VsbC5jb20ACgkQPdpSUn0qwZltUwgAylZfrGjCIqUv6sfwVyQr1tlp
KfMYqbGRhzBwO1af04s7mjzzj4YlVKSK4pCO8MHcLmyDyzCwwFUsB0SyV/YbQZI6
9APQb8E/ixsVE6Fzn6/TmeMe7aFY5i+atPZOlP1bLuSause8uht0/DsTeNxB3n8h
R4QvqcIzPq1e6bQfwTfIgOlC4X9Cr/D2h1xaai88XyDLsC87zIPBdnXgl/b95jbF
CzzMhZa/bXFNMe0kMU4V0ZTpN2QkiHHnx9kQwJtFYhrYx10JNrKDZryMLZQ4dl6g
j37ZIScYfgu8y9YonjIVztaD+g+gtGvMihcK+8dJ8v3Gw16jChPgjQ6XPuVQPg==
=uDiC
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74648@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74648
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch