fix: strip URI scheme prefixes from hostname input#532
Merged
torlando-tech merged 1 commit intomainfrom Feb 23, 2026
Merged
Conversation
Users pasting URLs like "http://rns.soon.it" instead of bare hostnames caused a fatal IllegalStateException when editing the interface config. validateHostname() now strips http:// and https:// prefixes, and callers use the cleaned value instead of the raw input. Fixes COLUMBA-43 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Greptile SummaryThis PR fixes a fatal crash (COLUMBA-43) when users paste full URLs like Changes Made:
Impact:
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 3529802 |
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
validateHostname()now stripshttp://andhttps://prefixes (and any path component) before validation, so users who paste a full URL get the hostname extracted automaticallyentityToConfig()uses the cleaned value from validation, fixing existing poison data in the database on readvalidateConfigState()writes the cleaned hostname back to UI state so subsequent saves persist the sanitized valueContext
Fixes COLUMBA-43 — users entering
http://rns.soon.itas a TCP host caused a fatalIllegalStateExceptionwhen editing the interface config. 5 occurrences across 2 users on v0.8.12-beta.Test plan
InputValidatorTest,InterfaceRepositoryTest, andInterfaceManagementViewModelTestpasshttp://rns.soon.itas TCP host, verify it saves asrns.soon.it🤖 Generated with Claude Code