From e5ab8c1811cf3c7e368cf43bdb349bb990fd9c01 Mon Sep 17 00:00:00 2001 From: Wes Hampton Date: Fri, 17 Mar 2017 13:02:36 -0400 Subject: [PATCH] Convert signatures to strings before hashing (#1) Provides compatibility for CF9 by preventing error of "ByteArray objects cannot be converted to strings". --- lib/sign/HmacSigner.cfc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sign/HmacSigner.cfc b/lib/sign/HmacSigner.cfc index e0cffe1..4dc60ec 100644 --- a/lib/sign/HmacSigner.cfc +++ b/lib/sign/HmacSigner.cfc @@ -162,8 +162,8 @@ component var expectedSignature = sign( message ); // Compare the two binary values using a quick hash. - return( hash( signature ) == hash( expectedSignature ) ); + return( hash( toString( signature ) ) == hash( toString( expectedSignature ) ) ); } -} \ No newline at end of file +}