Automatic plugin ftp value stored improperly if FTP failed. causing function to break for good
|Reported by:||dwenaus||Owned by:|
This is a minor bug as it does not affect that many, but an issue nonetheless.
On my server, a stock CentOS. using Wordpress 2.7 when i go to automatically install or upgrade a plugin if i initially enter localhost as the server, then everything works fine. however if I enter my actual hostname either http://mydomain.com, or ftp://mydomain.com simply mydomain.com then the FTP will not work. I realize that this issue is probably server specific.
The bug arises when I attempt to connect a second time. Then the already stored info in wp_option -> ftp_credentials is invalid. somehow the end part of the hostname got stored as the port and the hostname is only stored as 'http'. and then strange things occur as the stored domain is appended to the entered domain. So there is a bug in how the ftp_credentials data is stored when a failure occurs.
here is the value of my ftp_credentials when it has stored the wrong value:
once the data is stored improperly the only solution is to delete the ftp_credentials option field, as entering it again and again does not work as the wrong port is always appended.
i would also recommend a small help text if there is an error (or even before the error) that on some hosts they may need to enter localhost instead of their domain name.
Is the solution to escape the char before serializing. It seems the problem might be the : after http: