From 76bc39ec84a1f4fcd9542c30707af91b5ca2fe93 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Wed, 25 Dec 2013 15:51:29 -0500 Subject: Issue #1414368 by coolestdude1, Dave Reid: Drupal_http_request does not handle basic auth correctly when dealing with blank passwords. --- includes/common.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index 6f85b5248..a64f0c555 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -929,7 +929,7 @@ function drupal_http_request($url, array $options = array()) { // If the server URL has a user then attempt to use basic authentication. if (isset($uri['user'])) { - $options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (isset($uri['pass']) ? ':' . $uri['pass'] : '')); + $options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (isset($uri['pass']) ? ':' . $uri['pass'] : ':')); } // If the database prefix is being used by SimpleTest to run the tests in a copied -- cgit v1.2.3