Closed Bug 2095742 Opened 5 days ago Closed 5 days ago

browser_link_preview.js connects to the real itisatrap.org when run twice in a row

Categories

(Core :: Machine Learning: Frontend, task)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

test_fetch_errors in browser_link_preview.js fetches https://itisatrap.org/firefox/its-a-trap.html to check the phishing error. build/pgo/server-locations.txt only proxies www.itisatrap.org, so this request goes to the real host.

Safe Browsing classification runs in parallel with the connection. On a first run the DNS lookup is slow enough that the channel is cancelled as phishing before connecting. When the test runs again in the same browser (mochitest-repeat jobs), the DNS is cached, and the socket connects before the cancel: FATAL ERROR: Non-local network connections are disabled and a connection attempt to itisatrap.org was made.

Fix: use www.itisatrap.org, as the other phishing tests do.

itisatrap.org has no entry in server-locations.txt, so the request leaves the test proxy. Safe Browsing classifies in parallel with the connection: once a previous run has cached the host's DNS, the socket connects to the real host before the channel is cancelled as phishing.

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/52cedd0f8e94 https://hg.mozilla.org/integration/autoland/rev/765ec7a9475f Fetch the phishing test page from www.itisatrap.org in browser_link_preview.js, r=Mardak.
Status: ASSIGNED → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: