Skip to content

Commit 3407709

Browse files
1 parent 0adaec1 commit 3407709

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

application/libraries/REST_Controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package CodeIgniter
99
* @subpackage Libraries
1010
* @category Libraries
11-
* @author Phil Sturgeon
11+
* @author Phil Sturgeon, Chris Kacerguis
1212
* @license http://philsturgeon.co.uk/code/dbad-license
1313
* @link https://github.com/philsturgeon/codeigniter-restserver
1414
* @version 2.6.2
@@ -1346,7 +1346,7 @@ protected function _prepare_digest_auth()
13461346

13471347
// We need to retrieve authentication informations from the $auth_data variable
13481348
preg_match_all('@(username|nonce|uri|nc|cnonce|qop|response)=[\'"]?([^\'",]+)@', $digest_string, $matches);
1349-
$digest = array_combine($matches[1], $matches[2]);
1349+
$digest = (empty($matches[1]) || empty($matches[2])) ? array() : array_combine($matches[1], $matches[2]);
13501350

13511351
if ( ! array_key_exists('username', $digest) OR !$this->_check_login($digest['username']))
13521352
{

0 commit comments

Comments
 (0)