Skip to content

Commit 6c0351d

Browse files
committed
fix: update error messages to say localhost/loopback
Error messages for HTTP URL rejection now correctly say 'localhost/loopback' instead of just 'localhost', matching the actual _validate_url_scheme behavior that allows any loopback host.
1 parent d925baf commit 6c0351d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5030,7 +5030,7 @@ def _validate_and_install_local(yaml_path: Path, source_label: str) -> None:
50305030
_validate_url_scheme(from_url)
50315031
except ValueError as exc:
50325032
console.print(f"[red]Error:[/red] Invalid URL: {exc}")
5033-
console.print("URL must use HTTPS for security. HTTP is only allowed for localhost URLs.")
5033+
console.print("URL must use HTTPS for security. HTTP is only allowed for localhost/loopback URLs.")
50345034
raise typer.Exit(1)
50355035

50365036
console.print("[yellow]Warning:[/yellow] Installing from external URL.")
@@ -5058,7 +5058,7 @@ def _validate_and_install_local(yaml_path: Path, source_label: str) -> None:
50585058
try:
50595059
_validate_url_scheme(source)
50605060
except ValueError:
5061-
console.print("[red]Error:[/red] Only HTTPS URLs are allowed, except HTTP for localhost.")
5061+
console.print("[red]Error:[/red] Only HTTPS URLs are allowed, except HTTP for localhost/loopback.")
50625062
raise typer.Exit(1)
50635063

50645064
import tempfile

0 commit comments

Comments
 (0)