Ipfs-companion: No longer works in Firefox Nightly

Created on 16 Nov 2018  路  6Comments  路  Source: ipfs/ipfs-companion

The IPFS Companion stopped working one鈥搕hree weeks ago in Firefox Nightly.

It can鈥檛 connect to IPFS Desktop anymore. IPFS is listening on the expected ports, however. IPFS Companion still works in Chromium.

I鈥檝e tried reinstalling IPFS Companion and have tested with older versions all the way back to 2.4.0.

Confirmed issue on Firefox Nightly on macOS 10.14 and Windows 10.1809.

kinbug

Most helpful comment

Works for me.

All 6 comments

OK, the admin interface is returning 403 Forbidden.

The difference between Chrome and Firefox is that Firefox appends a Origin: moz-extension://{extension-installation-id} HTTP request header. If I remove that header from Firefox鈥檚 requests, everything starts working again.

Thank you for reporting!

Interesting. This is basically Firefox version of https://github.com/ipfs-shipyard/ipfs-companion/issues/615 (which we fixed in https://github.com/ipfs-shipyard/ipfs-companion/pull/616).

In short, Chrome was adding Origin: null to fetch made from webextension background pages and acted as sort of false-positive trigger for CORS validation producing 403 Forbidden.

Seems that Firefox Nightly started setting Origin: moz-extension://{extension-installation-id} (which is better than null) but that produces the same error. Will probably should apply similar fix here.

Heads up: I鈥檇 expect this behavior to change in Firefox. The internal UUID they send is unique and persistent per installation. It would allow for user tracking.

Edit: upstream issue.

Correction: it鈥檚 been like this for a year according to bugz#1405971. I鈥檓 not sure why this issue only started affecting IPFS now.

@da2x shipped a fix in v2.6.1.12130 (Beta), give it a try! :)
We now compare URL.origin in value-agnostic way, so it should work even if Firefox changes the Origin value to something else (eg. if they switch to 'null', like in Chromium)

Works for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lidel picture lidel  路  3Comments

djdv picture djdv  路  3Comments

lidel picture lidel  路  5Comments

lidel picture lidel  路  4Comments

lidel picture lidel  路  4Comments