Repository navigation
Web portal sections, Let's Encrypt, Cloudflare Tunnel, and no redirect loop behind IIS - #19
Conversation
…and no redirect loop behind an HTTPS proxy Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C8hDUgJ5YkhjxzEwQXHEps
… layout, update notice, icon; no flash before sign-in Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C8hDUgJ5YkhjxzEwQXHEps
There was a problem hiding this comment.
MergeGuard review
Risk: 🔴 60/100 — risky
Findings: 🔴 1 high · 🟠 1 medium
Recommended fixes
src/tls.rs— Restrict HTTPS-bypass logic to trusted proxy sources by verifying the peer address is loopback (or later extend to a configurable allowlist). Continue to allow ACME challenge paths. (confidence 86%)
Security review — 🔴 1 high · 🟠 1 medium (2 findings)
Dependency, filesystem & container image checks (OSV + Trivy + container scan) for this pull request.
Lockfile and manifest advisories are listed here only — bump affected versions in package.json (or your package manager manifest) and regenerate lockfiles locally. MergeGuard does not post these on Files changed or auto-fix lockfiles.
Cargo.lock — 🟠 1 medium (1 finding)
- 🟠 medium · security — Trivy (GHSA-wrw7-89jp-8q8g): Unsoundness in
IteratorandDoubleEndedIteratorimpls forglib::VariantStrIter—glib@0.18.5inCargo.lockReview GHSA-wrw7-89jp-8q8g and upgrade or remove the affected dependency. Reference: GHSA-wrw7-89jp-8q8g
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
⚠️ This PR may benefit from a deep scan — consider triggering@mergeguards deep-scan.
MergeGuard scope: 1 dependency manifest or lockfile (package.json, package-lock.json, pnpm-lock.yaml, yarn.lock, etc.) was not sent to the AI reviewer — MergeGuard runs OSV/Trivy security scans on those paths instead. Upgrade vulnerable packages in your manifest and regenerate lockfiles locally.
Reviewed by MergeGuard AI
MergeGuard agent actionsFix all findingsAll issues (1)
Apply auto-fixes for the findings above on this branch:
Or reply with |
…ctions Documents the 0.2.9 server features from PR #19: --acme (automatic Let's Encrypt with renewal, port 80, staging), --tunnel / --tunnel-token (Cloudflare Tunnel via cloudflared), certificate files reloaded without a restart, reverse proxies that send X-Forwarded-Proto / X-ARR-SSL / CF-Visitor / Forwarded no longer loop, and the portal's Library, Carts, Generator, Adverts and AzuraCast sections with the update banner. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014PpT9xjPyRV4m8YCwhW7if
…e or the local network Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C8hDUgJ5YkhjxzEwQXHEps
|
MergeGuard's two findings:
Generated by Claude Code |
There was a problem hiding this comment.
MergeGuard review
Risk: 🟢 23/100 — low risk
Findings: 🟠 1 medium
Security review — 🟠 1 medium (1 finding)
Dependency, filesystem & container image checks (OSV + Trivy + container scan) for this pull request.
Lockfile and manifest advisories are listed here only — bump affected versions in package.json (or your package manager manifest) and regenerate lockfiles locally. MergeGuard does not post these on Files changed or auto-fix lockfiles.
Cargo.lock — 🟠 1 medium (1 finding)
- 🟠 medium · security — Trivy (GHSA-wrw7-89jp-8q8g): Unsoundness in
IteratorandDoubleEndedIteratorimpls forglib::VariantStrIter—glib@0.18.5inCargo.lockReview GHSA-wrw7-89jp-8q8g and upgrade or remove the affected dependency. Reference: GHSA-wrw7-89jp-8q8g
⚠️ This PR may benefit from a deep scan — consider triggering@mergeguards deep-scan.
MergeGuard scope: 1 dependency manifest or lockfile (package.json, package-lock.json, pnpm-lock.yaml, yarn.lock, etc.) was not sent to the AI reviewer — MergeGuard runs OSV/Trivy security scans on those paths instead. Upgrade vulnerable packages in your manifest and regenerate lockfiles locally.
Reviewed by MergeGuard AI
The data folder is set once per test process, so a playlist one test saved leaked into the next and made https_and_portal / app_and_server_stay_in_step time out depending on test order (CI test-linux). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C8hDUgJ5YkhjxzEwQXHEps
There was a problem hiding this comment.
MergeGuard review
Risk: 🟠 35/100 — moderate
Findings: 🟠 3 medium
Recommended fixes
src/server.rs— Do not persist the Cloudflare Tunnel token to server.json; keep it in-memory only while still allowing updates from the UI. This prevents plaintext secrets at rest. (confidence 78%)src/server_main.rs— Avoid persisting the Cloudflare Tunnel token from CLI flags to the saved config to reduce leakage via server.json. Encourage use of the environment variable instead. (confidence 70%)
Security review — 🟠 3 medium (3 findings)
Dependency, filesystem & container image checks (OSV + Trivy + container scan) for this pull request.
Lockfile and manifest advisories are listed here only — bump affected versions in package.json (or your package manager manifest) and regenerate lockfiles locally. MergeGuard does not post these on Files changed or auto-fix lockfiles.
Cargo.lock — 🟠 1 medium (1 finding)
- 🟠 medium · security — Trivy (GHSA-wrw7-89jp-8q8g): Unsoundness in
IteratorandDoubleEndedIteratorimpls forglib::VariantStrIter—glib@0.18.5inCargo.lockReview GHSA-wrw7-89jp-8q8g and upgrade or remove the affected dependency. Reference: GHSA-wrw7-89jp-8q8g
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
⚠️ This PR may benefit from a deep scan — consider triggering@mergeguards deep-scan.
MergeGuard scope: 1 dependency manifest or lockfile (package.json, package-lock.json, pnpm-lock.yaml, yarn.lock, etc.) was not sent to the AI reviewer — MergeGuard runs OSV/Trivy security scans on those paths instead. Upgrade vulnerable packages in your manifest and regenerate lockfiles locally.
Reviewed by MergeGuard AI
… file Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C8hDUgJ5YkhjxzEwQXHEps
There was a problem hiding this comment.
MergeGuard review
Risk: 🔴 60/100 — risky
Findings: 🔴 1 high · 🟠 1 medium
Recommended fixes
src/tls.rs— Restrict trust of reverse-proxy HTTPS headers to loopback connections only to prevent LAN clients from downgrading HTTPS by forging headers. (confidence 90%)
Security review — 🔴 1 high · 🟠 1 medium (2 findings)
Dependency, filesystem & container image checks (OSV + Trivy + container scan) for this pull request.
Lockfile and manifest advisories are listed here only — bump affected versions in package.json (or your package manager manifest) and regenerate lockfiles locally. MergeGuard does not post these on Files changed or auto-fix lockfiles.
Cargo.lock — 🟠 1 medium (1 finding)
- 🟠 medium · security — Trivy (GHSA-wrw7-89jp-8q8g): Unsoundness in
IteratorandDoubleEndedIteratorimpls forglib::VariantStrIter—glib@0.18.5inCargo.lockReview GHSA-wrw7-89jp-8q8g and upgrade or remove the affected dependency. Reference: GHSA-wrw7-89jp-8q8g
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
⚠️ This PR may benefit from a deep scan — consider triggering@mergeguards deep-scan.
MergeGuard scope: 1 dependency manifest or lockfile (package.json, package-lock.json, pnpm-lock.yaml, yarn.lock, etc.) was not sent to the AI reviewer — MergeGuard runs OSV/Trivy security scans on those paths instead. Upgrade vulnerable packages in your manifest and regenerate lockfiles locally.
Reviewed by MergeGuard AI
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C8hDUgJ5YkhjxzEwQXHEps
There was a problem hiding this comment.
MergeGuard review
Risk: 🟠 35/100 — moderate
Findings: 🟠 2 medium
Recommended fixes
src/server.rs— Require authentication for the /api/v1/server endpoint to prevent unauthenticated disclosure of server configuration details. (confidence 92%)
Security review — 🟠 2 medium (2 findings)
Dependency, filesystem & container image checks (OSV + Trivy + container scan) for this pull request.
Lockfile and manifest advisories are listed here only — bump affected versions in package.json (or your package manager manifest) and regenerate lockfiles locally. MergeGuard does not post these on Files changed or auto-fix lockfiles.
Cargo.lock — 🟠 1 medium (1 finding)
- 🟠 medium · security — Trivy (GHSA-wrw7-89jp-8q8g): Unsoundness in
IteratorandDoubleEndedIteratorimpls forglib::VariantStrIter—glib@0.18.5inCargo.lockReview GHSA-wrw7-89jp-8q8g and upgrade or remove the affected dependency. Reference: GHSA-wrw7-89jp-8q8g
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
MergeGuard scope: 1 dependency manifest or lockfile (package.json, package-lock.json, pnpm-lock.yaml, yarn.lock, etc.) was not sent to the AI reviewer — MergeGuard runs OSV/Trivy security scans on those paths instead. Upgrade vulnerable packages in your manifest and regenerate lockfiles locally.
Reviewed by MergeGuard AI
Keeps this branch's server update check (selfupdate, ServerCfg.check_updates) as the one source of ServerInfo.latest and drops #19's second update thread; the release page now comes from the same release. AzuraCast calls from the portal need the AzuraCast permission. Playlist Insert/RemoveRows commands need edit_playlists. The generator's category folder picker (moved to genui.rs) goes through App::pick. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V5uW8ddhUDidYMFx9SLghq
Requested by epell · project thread
The Webportal and Server parts of the v0.2.9 list.
Server
URL_TOO_MANY_REDIRECTSfixed. With HTTPS on, every plain-HTTP request got a 301 tohttps://, and a proxy that handles HTTPS itself (IIS/ARR, nginx, Cloudflare) sent it straight back. Plain requests from a proxy that says the browser used HTTPS (X-Forwarded-Proto: https, IIS'sX-ARR-SSL,CF-Visitor,Forwarded: proto=https) are now passed through instead of redirected (tls.rs,behind_https_proxy,pass_plain).src/acme.rs, RFC 8555 withring+rcgen+ureq, no new async stack). HTTP-01 on port 80 (also answered on every port, so a proxy can pass/.well-known/acme-challenge/on). Renews with 30 days left. The new certificate is swapped in without a restart: the TLS config now uses a swappable cert resolver (tls::CertSwap). Port 80 also redirects browsers to the portal. CLI:--acme,--acme-email,--acme-staging,--acme-http-port,--no-acme. Setup asks for a domain.--cert/--keyare reloaded when the files change (certbot, win-acme), checked every 5 minutes.src/tunnel.rs). The server runscloudflared, restarts it if it dies and stops it on exit. With a token it uses your own domain; without one you get a quicktrycloudflare.comaddress (shown in the log and Server settings). The token goes in through the environment, not argv. Switching it on or off in Server settings takes effect at once. CLI:--tunnel,--tunnel-token/CLOUDFLARE_TUNNEL_TOKEN,--cloudflared.ServerInfogainslatest,release_page,cert_expires,acme_*andtunnel_*.updater::check/downloadnow take a repaint closure instead of an eguiContext, so the server can use it.ServerUpdate's new fields areOptions, so an older app that saves Server settings doesn't switch Let's Encrypt or the tunnel off.POST /api/v1/azuracast(proxies only/station/{st}…,/nowplaying…,/statusand/stations, using the AzuraCast settings), plusCmd::InsertandCmd::RemoveRowsfor portal playlist edits.Web portal
#desk {display:grid}was overriding thehiddenattribute.[hidden]now always wins, and nothing shows until the script has picked the sign-in box or the desk./favicon.png,/favicon.ico, apple-touch-icon).Testing
cargo buildhas no warnings,cargo fmtwas run, andcargo testpasses. New tests:X-Forwarded-Proto: httpnot_afterparsing for UTCTime and GeneralizedTimecloudflaredPEBBLE/PEBBLE_DIRare set and is skipped otherwise, so CI skips it.cloudflared, IIS itself, and AzuraCast control calls against a real station.Changelog lines (for v0.2.9)
New
Fixed
ERR_TOO_MANY_REDIRECTSwith HTTPS on behind IIS or another reverse proxy.Docs:
docs/SERVER.mdcovers Let's Encrypt, reverse proxies (IIS, nginx) and Cloudflare Tunnel. The website's/server/page is being updated in PR #14.Generated by Claude Code