Closed Bug 1146969 Opened 9 years ago Closed 7 years ago

about:sync-log does not open files with the sandbox enabled

Categories

(Core :: DOM: Content Processes, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
e10s - ---

People

(Reporter: mccr8, Assigned: mrbkap)

References

Details

If I go to about:sync-log in e10s mode, it lists all of the files, but I just get a blank page if I click on one of the files.  It works fine in a non-e10s window.
suggestion from triage is to make this page run in the chrome process
Assignee: nobody → mrbkap
So getURIFlags for this about module returns 0, which should mean it always loads in the parent. I suspect because it returns a file: channel we're probably using the file: URI to decide where to load. Maybe set the channel's originalURI to the about: URI before returning from newChannel to fix this?

http://mxr.mozilla.org/mozilla-central/source/services/sync/Weave.js#176
The problem doesn't appear to be related to about:sync-log, but simply to the file URLs in the directory listing - eg, copy/pasting one of the file:// URLs into a new tab exhibits the same behaviour.  If you whitelist file:// URLs in e10sutils.jsm to always load in the parent things also work fine.

Also, for me, file:///Users/skip works, but stops working as soon as I enter "Library".  Mossop's current guess given this information is that the sandbox is restricting it.
Marking as blocking Bug 1152140, in the hope that it fixes it, but not dupe -- I hit this without e10s.
Blocks: 1152140
Note that I'm loading my entire browser session without e10s. Not sure if that's different to Comment 0's experiment with a non-e10s *window*.
FWIW, dtruss shows that clicking Library from file://Users/dolske is being opened in the child, and is bring rejected in the syscall. So would sound like a sandbox issue... (WFM with no E10S)

# dtruss -p 99806 -s
...
open_nocancel("/Users/dolske/Library\0", 0x1100004, 0x1037C0F04)>--->--- = -1 Err#1

              libsystem_kernel.dylib`__open_nocancel+0xa
              XUL`nsDirEnumeratorUnix::Init(nsLocalFile*, bool)+0x7d
              XUL`nsLocalFile::GetDirectoryEntries(nsISimpleEnumerator**)+0x8b
              XUL`nsDirectoryIndexStream::Init(nsIFile*)+0x10a
              ...
Whiteboard: [readinglist-v2]
I think smichaud knows about the sandbox and can enlighten us here
As Dolske noticed, we're handling file:// URLs in the child process.  But should be handling them in the chrome process.  Bug 922481 has been opened on this issue.

I'd really like to wait until this bug is fixed by doing that.

If we can't wait, we *could* add more exceptions to the set of content process sandbox rules at bug 1083344.  But we've already rejected a "read anything anywhere" rule in the default (level 1) ruleset.
Hey Michal, what does the timeline for bug 922481 look like? We'd like to fix this bug pretty soon, but if the other bug is making progress, then we could probably push this out a little.
Flags: needinfo?(michal.novotny)
Summary: about:sync-log does not open files in e10s mode → about:sync-log does not open files with the sandbox enabled
(In reply to Blake Kaplan (:mrbkap) (please use needinfo!) from comment #12)
> Hey Michal, what does the timeline for bug 922481 look like? We'd like to
> fix this bug pretty soon, but if the other bug is making progress, then we
> could probably push this out a little.

I won't get to it at least next 2-3 weeks.
Flags: needinfo?(michal.novotny)
Whiteboard: [readinglist-v2]
moving to e10s - not a sync issue
Component: Sync → DOM: Content Processes
Product: Firefox → Core
Whiteboard: [readinglist-v2]
Whiteboard: [readinglist-v2]
This works for me now.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.