Closed Bug 1671499 Opened 4 years ago Closed 4 years ago

Outreachy Contribution to HTTPS-Only (Leslie)

Categories

(Core :: DOM: Security, task, P4)

task

Tracking

()

RESOLVED INACTIVE

People

(Reporter: lesore0789, Assigned: lesore0789, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [domsecurity-active])

Attachments

(2 files)

Attached image EnableHTTPS.jpg

Initial task of enabling HTTPS-Only mode on Nightly.

Attached image LamebookNightly.png

Steps to reproduce:

Enable 'HTTPS-Only Mode' (HOM) in the browser from preferences window.
Enter the URL 'www.lamebook.com' in the address bar

Actual Results

The website is blocked due to security reasons.

Expected Results

Since the site does not support HTTPS, the expected result is correct.

Assignee: nobody → lesore0789
Severity: -- → S4
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P3
Whiteboard: [domsecurity-active]
Mentor: ckerschb
Priority: P3 → P4

Your first contribution to HTTPS-Only

HTTPS-Only Mode upgrades every connection from http: to https:. If a web site does not support https:, then Firefox displays an error page. You can test this yourself when following these steps:

  • Start Firefox
  • Enable HTTPS-Only Mode (Enter about:preferences#privacy, scroll to the end of the page and "Enable HTTPS-Only Mode in all Windows")
  • Visit http.rip (and wait for 3 seconds)
  • The HTTPS-Only Error Page appears stating that the page http.rip does not support https.

In some cases however it's also possible that adding 'www' makes the https request succeed. To reproduce:

  • Start Firefox
  • Enable HTTPS-Only Mode
  • Visit http://speedofanimals.com (and wait for 3 seconds)
  • The HTTPS-Only Error Page appears stating that http://speedofanimals.com does not support https.
    However, if you enter http://www.speedofanimals.com (note the www) then the upgrading to https succeeds.

Here is the task: "Provide Suggestions in the HTTPS-Only error page what requests would succeed."
In detail, modify the HTML, CSS and JS in the HTTPS-Error Page ( errorpage.html, errorpage.js, aboutHttpsOnlyError.css ) by providing suggestions to the end user what request would succeed, e.g in that case adding 'www'.

In more detail, once the error page appears because upgrading to https does not succeed, you could query the URL from the page that HTTPS-Only Mode tried to upgrade (e.g. in our example from above http://speedofanimals.com).
Take that URL, add 'www' (e.g. http://www.speedofanimals.com) and perform a request (e.g. fetch request) to that page. If the server responds, then provide a link (e.g. a href="") in the error page which the end user could then click on.

Bonus points for making the newly added mechanism visually attractive to the end user.

Please upload your contribution in the form of a phabricator code patch to this Bug. To set up Phabricator please follow these instructions: https://wiki.mozilla.org/Phabricator

Good Luck!

Flags: needinfo?(lesore0789)

Closing as INACTIVE.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → INACTIVE
Flags: needinfo?(lesore0789)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: