Closed Bug 1616870 Opened 4 years ago Closed 4 years ago

IsRunningAsASnap incorrectly detected when not running from a snap

Categories

(Firefox :: Shell Integration, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 75
Tracking Status
firefox75 --- fixed

People

(Reporter: sergio.schvezov, Assigned: sergio.schvezov)

References

Details

Attachments

(2 files)

Attached patch snap_name.patchSplinter Review

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

On Ubuntu

  • apt install firefox
  • snap install emacs --classic
  • launch emacs
  • from emacs, launch firefox (the deb)

Actual results:

Firefox detects it is in a snap since the SNAP environment variable was exported for the context of emacs.

Expected results:

Firefox should have a stricter check. I have attached a proposal patch.

FWIW the patch looks good to me and makes sense.

Can I have this bug assigned to myself?

Hi Sergio!

Thank you very much for filing this and providing a patch! I agree with Olivier the patch looks good to me. Although, I don't feel qualified to r+ it. I'm not a Gecko developer and I haven't written C++ in years.

The Shell Integration component doesn't have an owner and when I look at who changed this file[1], nobody really stands out. I had a quick chat with Sylvestre and he said :glandium could be a good fit. How does this sound to you, Mike?

[1] https://hg.mozilla.org/mozilla-central/annotate/0cec40c582f0e90b3690dc3c9fcf8a098d49ca2d/browser/components/shell/nsGNOMEShellService.cpp?ignorews=1

Assignee: nobody → sergio.schvezov
Status: UNCONFIRMED → NEW
Component: Untriaged → Shell Integration
Depends on: 512305
Ever confirmed: true
Flags: needinfo?(mh+mozilla)

Karl, what do you think? Or should we redirect this to the Red Hat folks?

Flags: needinfo?(mh+mozilla) → needinfo?(karlt)

Yes, I'm not familiar this this.

Flags: needinfo?(karlt) → needinfo?(jhorak)

I'll look at it.
Sergio can you use phabricator to submit the patch? see https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html
AFAIK Mozilla no longer commits patches from bugzilla.

Flags: needinfo?(jhorak) → needinfo?(sergio.schvezov)

Sounds good! I will do that tomorrow when my holiday break is over

Flags: needinfo?(sergio.schvezov)

Hi Marin, I have submitted the patch to phabricator and set you up as a reviewer (hope that is what was expected, if not I will take note of this, there was a lot of reading involved).

Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b60ed8edab47
Correctly detect when running as a snap r=stransky
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: