Bug #70101 [NEW]: curl with digest authentication does work (all the time)
From: roeycohen at gmail dot com
Operating system: windows and linux
PHP version: 5.6.11
Package: cURL related
Bug Type: Bug
Bug description:curl with digest authentication does work (all the time)
Description:
------------
trying to use curl_exec with digest authentication does not work
properly.
running the test script always fails to pass the security challenge.
using the browser or wget directly works perfectly.
also, trying to run the same test on another server of mine, works from
an amazon linux with php 5.5.21 but does not work from my windows 7 x64
machine with php 5.6.11.
trying to run the test with php 5.5 or 5.4 using CLI on several windows
machines caused a complete crush of the php executable.
it seems like bug #69088 is related, but this bug also happens on linux
(5.5).
Test script:
---------------
<?
$curl = curl_init();
$curl_options = [
CURLOPT_HTTPAUTH => CURLAUTH_ANY,
CURLOPT_USERPWD => 'test_user:password',
CURLOPT_URL =>
'http://test_user:password@httpbin.org/digest-auth/auth/user/password',
CURLOPT_HEADER => true,
];
curl_setopt_array($curl, $curl_options);
curl_exec($curl);
curl_close($curl);
Expected result:
----------------
{
"authenticated": true,
"user": "user"
}
Actual result:
--------------
"Authentication failed" (with header 401)
--
Edit bug report at https://bugs.php.net/bug.php?id=70101&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70101&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70101&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70101&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70101&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70101&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70101&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70101&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70101&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70101&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70101&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70101&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70101&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70101&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70101&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70101&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70101&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70101&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70101&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70101&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70101&r=mysqlcfg
Thread (12 messages)
- roeycohen at gmail dot com
- laruence@php.netBug #70101 [Opn]: curl with digest authentication does work (all the time)
- laruence@php.netBug #70101 [Opn->Fbk]: curl with digest authentication does work (all the time)
- roeycohen at gmail dot comBug #70101 [Fbk->Opn]: curl with digest authentication does work (all the time)
- luca dot horn at gmail dot comBug #70101 [Com]: curl with digest authentication does work (all the time)
- dougk dot ff7 at gmail dot comBug #70101 [Com]: curl with digest authentication does work (all the time)
- dougk dot ff7 at gmail dot comBug #70101 [Com]: curl with digest authentication does work (all the time)
- dougk dot ff7 at gmail dot comBug #70101 [Com]: curl with digest authentication does work (all the time)
- gohel at basicguru dot deBug #70101 [Com]: curl with digest authentication does work (all the time)
- gohel at basicguru dot deBug #70101 [Com]: curl with digest authentication does work (all the time)
- cmb@php.netBug #70101 [Opn->Fbk]: curl with digest authentication does work (all the time)
- php-bugs at lists dot php dot netBug #70101 [Fbk->NoF]: curl with digest authentication does work (all the time)