Skip to content

Call prot_p() in FTPSHook so the FTPS data channel is protected #67946

Merged
potiuk merged 1 commit into
apache:mainfrom
shubhamraj-git:fix-ftp-tls
Jun 3, 2026
Merged

Call prot_p() in FTPSHook so the FTPS data channel is protected #67946
potiuk merged 1 commit into
apache:mainfrom
shubhamraj-git:fix-ftp-tls

Conversation

@shubhamraj-git
Copy link
Copy Markdown
Contributor

Some FTPS servers are configured to require a protected data channel and reject any data transfer that is not preceded by "PROT P". Against such a server, the current FTPSHook / FTPSFileTransmitOperator path fails with:

ftplib.error_perm: 550 SSL/TLS required on the data channel.

After this change, the same operator interoperates correctly with both permissive and strict FTPS servers.

This PR adds the missing self.conn.prot_p() call after login, matching the standard ftplib.FTP_TLS usage documented in the Python stdlib:

The user must explicitly secure the data connection by calling the prot_p() method.

https://docs.python.org/3/library/ftplib.html#ftplib.FTP_TLS

Was generative AI tooling used to co-author this PR?
  • Yes - Claude Code (Opus 4.7)

@potiuk potiuk merged commit a929d14 into apache:main Jun 3, 2026
171 of 173 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants