Ticket #33432: 33432.diff
File 33432.diff, 3.2 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/class-ftp-pure.php
110 110 $this->_data_close(); 111 111 return FALSE; 112 112 } 113 $ip_port = explode(",", ereg_replace("^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$", "\\1", $this->_message));113 $ip_port = explode(",", preg_replace("/^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$/", "\\1", $this->_message)); 114 114 $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3]; 115 115 $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]); 116 116 $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); -
src/wp-admin/includes/class-ftp-sockets.php
131 131 $this->_data_close(); 132 132 return FALSE; 133 133 } 134 $ip_port = explode(",", ereg_replace("^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$", "\\1", $this->_message));134 $ip_port = explode(",", preg_replace("/^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$/", "\\1", $this->_message)); 135 135 $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3]; 136 136 $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]); 137 137 $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); -
src/wp-admin/includes/class-ftp.php
380 380 function pwd() { 381 381 if(!$this->_exec("PWD", "pwd")) return FALSE; 382 382 if(!$this->_checkCode()) return FALSE; 383 return ereg_replace("^[0-9]{3} \"(.+)\".+", "\\1", $this->_message);383 return preg_replace("/^[0-9]{3} \"(.+)\".+/", "\\1", $this->_message); 384 384 } 385 385 386 386 function cdup() { … … 424 424 } 425 425 if(!$this->_exec("SIZE ".$pathname, "filesize")) return FALSE; 426 426 if(!$this->_checkCode()) return FALSE; 427 return ereg_replace("^[0-9]{3} ([0-9]+)".CRLF, "\\1", $this->_message);427 return preg_replace("/^[0-9]{3} ([0-9]+)/".CRLF, "\\1", $this->_message); 428 428 } 429 429 430 430 function abort() { … … 444 444 } 445 445 if(!$this->_exec("MDTM ".$pathname, "mdtm")) return FALSE; 446 446 if(!$this->_checkCode()) return FALSE; 447 $mdtm = ereg_replace("^[0-9]{3} ([0-9]+)".CRLF, "\\1", $this->_message);447 $mdtm = preg_replace("/^[0-9]{3} ([0-9]+)/".CRLF, "\\1", $this->_message); 448 448 $date = sscanf($mdtm, "%4d%2d%2d%2d%2d%2d"); 449 449 $timestamp = mktime($date[3], $date[4], $date[5], $date[1], $date[2], $date[0]); 450 450 return $timestamp; … … 818 818 function glob_regexp($pattern,$probe) { 819 819 $sensitive=(PHP_OS!='WIN32'); 820 820 return ($sensitive? 821 ereg($pattern,$probe):822 eregi($pattern,$probe)821 preg_match('/'.$pattern.'/',$probe): 822 preg_match('/'.$pattern.'/i',$probe) 823 823 ); 824 824 }