Skip to content

Commit e2d407d

Browse files
authored
fix: Fix compare message webhook message signature (#1315)
1 parent 5fee0c3 commit e2d407d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/box/sdk/BoxWebHookSignatureVerifier.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import com.box.sdk.internal.pool.MacPool;
44
import java.nio.charset.Charset;
55
import java.security.InvalidKeyException;
6-
import java.util.Arrays;
6+
import java.security.MessageDigest;
77
import java.util.Collections;
88
import java.util.EnumSet;
99
import java.util.Map;
@@ -127,7 +127,7 @@ private boolean verify(String key, BoxSignatureAlgorithm actualAlgorithm, String
127127
byte[] actual = Base64.decode(actualSignature);
128128
byte[] expected = this.signRaw(actualAlgorithm, key, webHookPayload, deliveryTimestamp);
129129

130-
return Arrays.equals(expected, actual);
130+
return MessageDigest.isEqual(expected, actual);
131131
}
132132

133133
/**

0 commit comments

Comments
 (0)