[Rt-commit] [rtir] 02/02: Calculate the SHA1 of the encoded $$content
Kevin Falcone
falcone at bestpractical.com
Tue Oct 28 14:23:32 EDT 2014
This is an automated email from the git hooks/post-receive script.
falcone pushed a commit to branch 3.0/sha-utf-8-data
in repository rtir.
commit efb58ad196683340f024daab97f0d6bb7265ae93
Author: morallo <m_orallo at yahoo.es>
Date: Fri Oct 24 16:41:30 2014 +0200
Calculate the SHA1 of the encoded $$content
This prevents Digest::SHA::sha512_base64 from croaking with wide characters.
Similar to what's done for MD5 in
https://github.com/bestpractical/rt/blob/80bcdcfdea2988329a49bc6823f54da5d304762c/lib/RT/User.pm#L1000
Fixes I#30469
---
html/Callbacks/RTIR/Elements/MakeClicky/Default | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/html/Callbacks/RTIR/Elements/MakeClicky/Default b/html/Callbacks/RTIR/Elements/MakeClicky/Default
index dcef5b7..0a13b67 100644
--- a/html/Callbacks/RTIR/Elements/MakeClicky/Default
+++ b/html/Callbacks/RTIR/Elements/MakeClicky/Default
@@ -247,10 +247,10 @@ unless (ref $ARGS{cache} && defined ${$ARGS{cache}}) {
return if $parent_args->{lookup_params};
require Digest::SHA;
- return $m->cache->get(Digest::SHA::sha512_base64($$content));
+ return $m->cache->get(Digest::SHA::sha512_base64(Encode::encode( "UTF-8", $$content)));
} elsif ($type eq 'store') {
require Digest::SHA;
- $m->cache->set(Digest::SHA::sha512_base64($$content),
+ $m->cache->set(Digest::SHA::sha512_base64(Encode::encode( "UTF-8", $$content)),
$$content,
"6 hours");
} else {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list