fix(security): http://analytics.flisk.si/ serves 200 instead of redirecting to https
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- infrastructure, security
Research direction
Reproduce with the curl command in the issue to confirm the 200 with no redirect. Then find the Worker's request handler — the entry module the Worker config points at — and check whether it looks at the request URL scheme; the 301 belongs there if the zone-level always-use-HTTPS setting is not the chosen route. Done means the curl check prints 301 with an https Location, the same URL over https still returns 200, and both are captured as tests.
Written by the indexing model from the issue text.
Description
Problem
http://analytics.flisk.si/ serves the page with status 200 instead of redirecting to https://. The site is a tracking dashboard, so a visitor on an open network can be served the page, and its scripts, over plain HTTP.
Reproduce:
- Run
curl -s -o /dev/null -w '%{http_code} %{redirect_url}' http://analytics.flisk.si/. - It prints
200with no redirect URL.
Expected: a 301 to the https URL. The same fix was filed for the other Flisk sites (host, inference, gardener, os, tools, chat, fleet); pages.flisk.si already redirects.
Root Cause Analysis
The zone does not force HTTPS for this hostname, and the Worker does not check the request scheme itself.
TDD Fix Plan
-
RED: Write a check that a plain-HTTP request to the site returns 301 with a Location on https.
GREEN: Enable the always-use-HTTPS rule for the hostname or redirect in the Worker. -
RED: Write a check that the https request still returns 200.
GREEN: Keep the redirect on http only.
REFACTOR: Document the rule once for all flisk.si hostnames.
Acceptance Criteria
-
http://analytics.flisk.si/returns 301 to https - The https page still returns 200
- All new tests pass
- Existing tests still pass
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 1h 33m
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from flisk-sh/analytics
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
All issues in flisk-sh/analytics
Similar issues
-
chore cloudflare-workers consistency d1 difficulty: easy documentation dx enhancement good first issue help wanted hygiene javascript maintenance priority: P3 seo
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Link Checker ReportOpenautomated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MattiaPARRINELLO/backstage#70 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
untemps/svelte-palette#298 ·