Validate frontend URL scheme in CLI server install#1661
Conversation
The _prompt_frontend function accepted any string without checking for a valid URL scheme. Users typing e.g. "myserver.com:8338" would get a broken config. Now re-prompts until the URL starts with http:// or https://.
Paragon SummaryThis pull request review analyzed 1 file and found no issues. The review examined code changes, potential bugs, security vulnerabilities, performance issues, and code quality concerns using automated analysis tools. Paragon did not detect any problems in the current diff. Proceed with merge after your normal checks. This PR tightens Key changes:
Confidence score: 5/5
1 file reviewed, 0 comments Tip: |
Summary
_prompt_frontendintfl server installnow validates that the URL starts withhttp://orhttps://myserver.com:8338)Test plan
cd cli && python -m pytest tests/ -v)tfl server install, enter a URL without a scheme, confirm it re-prompts