[wp-trac] [WordPress Trac] #8580: Automatic plugin ftp value stored
improperly if FTP failed. causing function to break for good
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 11 21:42:20 GMT 2008
#8580: Automatic plugin ftp value stored improperly if FTP failed. causing
function to break for good
---------------------+------------------------------------------------------
Reporter: dwenaus | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 2.7.1
Component: Upgrade | Version:
Severity: normal | Keywords:
---------------------+------------------------------------------------------
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:
a:4:{s:8:"hostname";s:4:"http";s:8:"username";s:8:"natureof";s:15:"connection_type";s:3:"ftp";s:4:"port";s:18:"//mydomain.com";}
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:
--
Ticket URL: <http://trac.wordpress.org/ticket/8580>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list