Closed Bug 1616870 Opened 4 years ago Closed 4 years ago

IsRunningAsASnap incorrectly detected when not running from a snap


(Firefox :: Shell Integration, defect)

Not set



Firefox 75
Tracking Status
firefox75 --- fixed


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




(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?


Assignee: nobody → sergio.schvezov
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
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
Correctly detect when running as a snap r=stransky
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.