-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIXED: FTP user and password strings urldecoded #16876
FIXED: FTP user and password strings urldecoded #16876
Conversation
Hi @javierperezm. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @javierperezm, Can you check Code Standars error in Travis. The PR looks like OK, but we should solve the problem with Coding Standars before. |
recoding to pass travis coding standards
@osrecio I don't understand the Travis response... the warnings are placed outside my changes, and even outside the class I patched |
@javierperezm Now the Travis is green, without Code Standard issues. I will review ASAP. |
@javierperezm thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
Hi @aleron75, thank you for the review. |
Once merged, don't forget you can easily backport this PR to 2.2 with the Porting Tool, read more here. |
Hi @javierperezm. Thank you for your contribution. |
Description
FTP connections can't use user or password strings with special characters, like @ or #.
$user = 'my@mail.com';
$pass = '#my@pass';
$host = 'ftphost.com';
$ftp->connect("ftp://{$user}:{$pass}@{$host}");
connect() calls parse_url() and this will break down bad the special chars...
Solution:
// ...
$user = urlencode($user);
$pass = urlencode($pass);
$ftp->connect( ... );
But connect() method calls ftp_login() without decode the $user and $pass vars
Manual testing scenarios
Contribution checklist