diff options
author | Klap-in <klapinklapin@gmail.com> | 2013-06-09 22:16:08 +0200 |
---|---|---|
committer | Klap-in <klapinklapin@gmail.com> | 2013-06-09 22:16:08 +0200 |
commit | fa3ed26bfbafa4d05ec77a799259d4a46baadd9a (patch) | |
tree | 0d46271dbcf63ef43a800a08d8b488d2da128575 | |
parent | 9b6fa49c06b538c53c9cf3e404ade82d6c003f79 (diff) | |
download | dokuwiki-fa3ed26bfbafa4d05ec77a799259d4a46baadd9a.tar.gz dokuwiki-fa3ed26bfbafa4d05ec77a799259d4a46baadd9a.zip |
update hashes in tests
-rw-r--r-- | _test/tests/lib/exe/fetch_statuscodes_external.test.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/_test/tests/lib/exe/fetch_statuscodes_external.test.php b/_test/tests/lib/exe/fetch_statuscodes_external.test.php index 1a2164828..bd7b2f93b 100644 --- a/_test/tests/lib/exe/fetch_statuscodes_external.test.php +++ b/_test/tests/lib/exe/fetch_statuscodes_external.test.php @@ -32,9 +32,8 @@ class fetch_statuscodes_external_test extends DokuWikiTest { $w = $this->width ? 'w='.$this->width.'&' : ''; $h = $this->height ? 'h='.$this->height.'&' : ''; if($hash === null) { - $hash = 'hash='.substr(md5(auth_cookiesalt().$this->media), 0, 6).'&'; + $hash = 'hash='.substr(PassHash::hmac('md5', $this->media, auth_cookiesalt()), 0, 6).'&'; } - return '/lib/exe/fetch.php?'.$hash.$w.$h.'{%token%}media='.rawurlencode($this->media); } @@ -48,7 +47,7 @@ class fetch_statuscodes_external_test extends DokuWikiTest { * expect: 412 status code */ function test_invalid_hash() { - $invalid_hash = 'hash='.substr(md5(auth_cookiesalt().'junk'), 0, 6).'&'; + $invalid_hash = 'hash='.substr(PassHash::hmac('md5', 'junk', auth_cookiesalt()), 0, 6).'&'; $token = 'tok='.media_get_token($this->media, $this->width, $this->height).'&'; $this->assertEquals(412,$this->fetchResponse($token, $invalid_hash)->getStatusCode()); |