aboutsummaryrefslogtreecommitdiffstats
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 15:16:53 +0100
commit04ec1eaa1ed05dffdcc91041b51d55dda658b6fe (patch)
tree7b6468df97aafafbb4328f64e309e2b3d3c03039
parentf06402390a1d6cbc68dad5d7386231fc5994ccd7 (diff)
downloadrspamd-04ec1eaa1ed05dffdcc91041b51d55dda658b6fe.tar.gz
rspamd-04ec1eaa1ed05dffdcc91041b51d55dda658b6fe.zip
Fix digest invocation.
-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});
}
}