fix(ftp): reject ftps scheme early with clear error instead of failing at dial #134

Closed
opened 2026-07-13 18:03:26 +00:00 by the.auditor · 1 comment
Owner

internal/downloader/ftp.go:24ParseFTPURL accepts ftps:// scheme but DialFTP uses ftp.Dial() (no TLS), so ftps:// URLs are accepted but fail at dial time with a confusing error like "connection refused" or timeout.

Should either:

  • Reject ftps:// with a clear message: "FTPS not yet supported"
  • Or implement TLS dialing via ftp.DialWithTLS()

Discovered during review of PR #133.

`internal/downloader/ftp.go:24` — `ParseFTPURL` accepts `ftps://` scheme but `DialFTP` uses `ftp.Dial()` (no TLS), so `ftps://` URLs are accepted but fail at dial time with a confusing error like "connection refused" or timeout. Should either: - Reject `ftps://` with a clear message: `"FTPS not yet supported"` - Or implement TLS dialing via `ftp.DialWithTLS()` Discovered during review of PR #133.
Owner

Closing — already handled. ParseFTPURL returns useTLS bool, DialFTP uses ftp.DialWithTLS when true (implemented in the FTP auth PR).

Closing — already handled. ParseFTPURL returns useTLS bool, DialFTP uses ftp.DialWithTLS when true (implemented in the FTP auth PR).
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/pget#134
No description provided.