diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-06-16 15:16:53 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-06-16 16:18:31 +0100 |
commit | fcfe6de1da024ebf63801e3b5950e0b98336f68e (patch) | |
tree | 9b1ceb08d46e650db1446c5b38222930d3f9d78c /utils | |
parent | f2334aeb8704af14446f94a7e204a190f3e7a278 (diff) | |
download | rspamd-fcfe6de1da024ebf63801e3b5950e0b98336f68e.tar.gz rspamd-fcfe6de1da024ebf63801e3b5950e0b98336f68e.zip |
Fix digest invocation.
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/redirector.pl.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/redirector.pl.in b/utils/redirector.pl.in index 555006374..fb8daf251 100755 --- a/utils/redirector.pl.in +++ b/utils/redirector.pl.in @@ -186,8 +186,8 @@ sub memcached_check_url { my ( $url ) = @_; my $context = Digest->new("SHA-256"); - - return $memd->get(unpack("H*", ($context->hash($url)))); + $context->update($url); + return $memd->get($context->digest()); } # Write url to memcached key @@ -196,8 +196,8 @@ sub memcached_cache_url { if ($url ne $url_real) { my $context = Digest->new("SHA-256"); - - $memd->set(unpack("H*", ($context->hash($url))), $url_real, + $context->update($url); + $memd->set($context->digest(), $url_real, $cfg{cache_expire}); } } |