Bug #78708 [Opn->Fbk]: ftp_login doesn't work with colon (:) in password

From: Date: Mon, 21 Oct 2019 10:02:52 +0000
Subject: Bug #78708 [Opn->Fbk]: ftp_login doesn't work with colon (:) in password
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223337@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78708&edit=1 ID: 78708 Updated by: cmb@php.net Reported by: julien dot chavee at gmail dot com Summary: ftp_login doesn't work with colon (:) in password -Status: Open +Status: Feedback Type: Bug Package: FTP related Operating System: CentOS PHP Version: 7.3.10 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Would it work, if you passed the following as $password: urlencode('abc:def') Previous Comments: ------------------------------------------------------------------------ [2019-10-21 09:16:41] julien dot chavee at gmail dot com Description: ------------ The PHP function ftp_login() return false with the following warning when the password contains the character colon (:): "PHP Warning: ftp_login(): 500" Test script: --------------- <?php $connection = ftp_connect( '[SERVER]', '[PORT]', '[TIMEOUT]' ); if($connection !== false) { $login = ftp_login( $connection, '[USERNAME]', 'abc:def' ); if($login === true) { echo 'Success'; } else { echo 'Failed'; } Expected result: ---------------- Display 'Success' Actual result: -------------- Display 'Failed' with the warning "PHP Warning: ftp_login(): 500" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78708&edit=1

« previous php.bugs (#223337) next »