Skip to content

Commit

Permalink
Fixing typo where realm would be wrong if not specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Feb 4, 2011
1 parent 705b328 commit d5f5ae3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Expand Up @@ -51,7 +51,7 @@ public function __construct($settings) {
$this->settings['realm'] = env('SERVER_NAME');
}
if (empty($this->settings['nonce'])) {
$this->settings['realm'] = uniqid('');
$this->settings['nonce'] = uniqid('');
}
if (empty($this->settings['opaque'])) {
$this->settings['opaque'] = md5($this->settings['realm']);
Expand Down
Expand Up @@ -292,4 +292,14 @@ function testParseAuthEmailAddress() {
$this->assertIdentical($expected, $result);
}

/**
* test password hashing
*
* @return void
*/
function testPassword() {
$result = DigestAuthenticate::password('mark', 'localhost', 'password');
$expected = md5('mark:localhost:password');
$this->assertEquals($expected, $result);
}
}

0 comments on commit d5f5ae3

Please sign in to comment.