summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-16 15:16:53 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-16 16:18:31 +0100
commitfcfe6de1da024ebf63801e3b5950e0b98336f68e (patch)
tree9b1ceb08d46e650db1446c5b38222930d3f9d78c /utils
parentf2334aeb8704af14446f94a7e204a190f3e7a278 (diff)
downloadrspamd-fcfe6de1da024ebf63801e3b5950e0b98336f68e.tar.gz
rspamd-fcfe6de1da024ebf63801e3b5950e0b98336f68e.zip
Fix digest invocation.
Diffstat (limited to 'utils')
-rwxr-xr-xutils/redirector.pl.in8
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});
}
}