From:             a dot schilder at gmx dot de
Operating system: Windows Server 2008R2
PHP version:      5.4.3
Package:          cURL related
Bug Type:         Bug
Bug description:NTML authentication of current user on different host fails

Description:
------------
A request with NTML authentication using the current, authenticated user
(CURLOPT_USERPWD ":") doesn't work, when doing a request to another host in
the same domain. Settings the same credentials directly for CURLOPT_USERPWD
works as expected.

Test script:
---------------
Script on "server1.domainXYZ", user already authenicated.
Curl requests to "server1.domainXYZ" and "server2.domainXYZ".


Version 1 (Server 1, explicitly setting the credentials of the current
user):
...
curl_setopt($ch, CURLOPT_URL, 'http://server1.domainXYZ/file.php');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
curl_setopt($ch, CURLOPT_USERPWD, "domainXYZ\\userX:passwordY");
...


Version 2 (Server 1, using current user):
...
curl_setopt($ch, CURLOPT_URL, 'http://server1.domainXYZ/file.php');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
curl_setopt($ch, CURLOPT_USERPWD, ":");
...


Version 3 (Server 2, explicitly setting the credentials of the current
user):
...
curl_setopt($ch, CURLOPT_URL, 'http://server2.domainXYZ/file.php');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
curl_setopt($ch, CURLOPT_USERPWD, "domainXYZ\\userX:passwordY");
...


Version 4 (Server 2, using current user):
...
curl_setopt($ch, CURLOPT_URL, 'http://server2.domainXYZ/file.php');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
curl_setopt($ch, CURLOPT_USERPWD, ":");
...

Expected result:
----------------
Version 1: works
Version 2: works
Version 3: works
Version 4: works

Actual result:
--------------
Version 1: works
Version 2: works
Version 3: works
Version 4: doesn't work

In Version 1-3 the user name is correctly sent and logged in the IIS logs
("cs-username").

In Version 4, the user name in the IIS logs is empty ("-"), so no user name
is sent by cURL.

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

Reply via email to