Handle no password specified and make testing for www-authenticate header non case sensitive

pull/3740/head
Isaac Connor 2023-07-05 15:51:16 -04:00
parent ddec9bbd39
commit 37b571a58a
1 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ if (!empty($_REQUEST['proxy'])) {
}
$url_parts = parse_url($url);
$username = $url_parts['user'];
$password = $url_parts['pass'];
$password = isset($url_parts['pass']) ? $url_parts['pass'] : '';
$method = 'GET';
// preparing http options:
@ -90,7 +90,7 @@ if (!empty($_REQUEST['proxy'])) {
$meta_data = stream_get_meta_data($fp);
ZM\Debug(print_r($meta_data, true));
foreach ($meta_data['wrapper_data'] as $header) {
preg_match('/WWW-Authenticate: Digest (.*)/', $header, $matches);
preg_match('/WWW-Authenticate: Digest (.*)/i', $header, $matches);
$nc = 1;
if (!empty($matches)) {
ZM\Debug("Matched $header");