From:             
Operating system: All
PHP version:      5.3.8
Package:          FTP related
Bug Type:         Feature/Change Request
Bug description:Option to force PHP to ignore the PASV address returned

Description:
------------
In response to the PASV command, FTP servers sometimes return their IP
address 
(10.X for example) and PHP honors this IP address, stores it in
ftp->pasvaddr 
and uses that for future connections.

This is problematic because PHP won't be able to communicate with a server

behind a NAT device using passive FTP.

The attached patch adds the USEPASVADDRESS option (a boolean) which can be
set 
and read via the ftp_set_option() and ftp_get_option() functions.
USEPASVADDRESS 
is set to TRUE by default to preserve existing functionality. When 
USEPASVADDRESS is set to FALSE, the ftp extension will ignore the IP
address 
returned by the PASV command and instead use the IP address passed to 
ftp_connect() (or ftp_ssl_connect())

In the future we may expand the values to include AUTO which would ignore
any 
RFC 1918 IP addresses returned by the PASV command.

The only thing to note is that the call to ftp_set_option() must be made
before 
ftp_pasv() is called.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=55651&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55651&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55651&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55651&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55651&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55651&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55651&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55651&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55651&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55651&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55651&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55651&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55651&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55651&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55651&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55651&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55651&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55651&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55651&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55651&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55651&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55651&r=mysqlcfg

Reply via email to