Fix #36103: ftp ssl connection fails during login

The patch is available at #63767 as requested.