Repository navigation
fix(login): fall back to http with a correct status URL - #6807
ToteMeiSter wants to merge 3 commits into
Conversation
When the server address is entered without a scheme, https is tried first and http is the fallback. The fallback passed the already complete status URL to checkServer(), which appends /status.php again. The request went to .../status.php/status.php and the user saw a misleading error. Pass the base URL instead, so the http fallback queries .../status.php. Signed-off-by: Krainov Gleb <krajnov.g@kontentplus.ru> Assisted-by: Claude-Code:claude-sonnet-5-5
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughWhen a forced-HTTPS check fails for a reason other than a certificate or TLS peer-verification failure, the activity offers an HTTP retry. Confirmation retries with the URL scheme changed to HTTP. Dismissal displays the original HTTPS error. The activity does not show the prompt if it is finishing or destroyed. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No concrete issue remains that would prevent merging after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The fallback now requires consent and rejects recognized certificate and peer-verification failures. Confirmed HTTP connections remain exposed to network tampering. The change strengthens downgrade controls, but complete end-to-end transport and cancellation guarantees were not established. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 1 files. (1 skipped: 1 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
04d84013-973c-4861-99ab-862631f94d36
📒 Files selected for processing (1)
app/src/main/java/com/nextcloud/talk/account/ServerSelectionActivity.kt
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
When the HTTPS status request fails for an address typed without a scheme, the client silently switched to HTTP and started the login flow. An on-path attacker could block HTTPS to force that downgrade (CWE-319). Now the user must confirm the insecure connection; declining or dismissing the dialog shows the regular HTTPS error. Manually typed http:// addresses are unchanged and get no dialog. Signed-off-by: Krainov Gleb <krajnov.g@kontentplus.ru> Assisted-by: Claude-Code:claude-opus-5-5
Skip the HTTP fallback dialog when the HTTPS failure has a CertificateException or SSLPeerUnverifiedException in its cause chain, so a declined certificate or host name mismatch is never downgraded. The dialog message now says "Could not connect" instead of "does not respond", which is wrong for 404/5xx. Signed-off-by: Krainov Gleb <krajnov.g@kontentplus.ru> Assisted-by: Claude-Code:claude-opus-5-5
|
Hi @ToteMeiSter thank you for your contributions. |
|
This is a bug fix and all CodeRabbit review threads are resolved. Once it is approved and merged, would it be possible to backport it to Suggested command for a maintainer after merge: This comment was drafted with AI assistance (Claude Code). |
Fixes #3899
When a server address is entered without a scheme, the app tries
https://first and falls back tohttp://.The fallback passed the already complete status URL to
checkServer(), which appends/status.phpagain.The request went to
.../status.php/status.phpand a misleading error was shown.The fallback now passes the base URL.
How to test
Enter the address of a server that serves only http (for example
10.0.2.2/ncfrom an emulator) without a scheme.Expected: login continues over http.
🖼️ Screenshots
n/a, no UI change
🏁 Checklist
/backport to stable-xx.x— maintainers to decide🤖 AI (if applicable)
The change was prepared with Claude Code (claude-sonnet-5-5) and reviewed by the author; the commit carries an
Assisted-bytrailer.It was not tested on a device.
detektandktlintCheckpass.🤖 Generated with Claude Code