From 1c316daff337ed065e66e42141d60209a957be22 Mon Sep 17 00:00:00 2001 From: Daniel Cheng Date: Wed, 10 Nov 2021 23:13:54 +0000 Subject: [Backport] Make base::UnguessableToken::operator!= constant time. This is a followup to https://crrev.com/c/3023887, which made operator== constant time by using BoringSSL helpers. The same CL also aimed to make operator!= constant time, but accidentally delegated to base::Token's operator== which is not constant time. Patch reviewed on: https://chromium-review.googlesource.com/c/chromium/src/+/3269926 Bug: 1004921 Task-number: QTBUG-104477 Change-Id: Ieda8fb6a736ced143831d9bcde75cddaaff50243 Reviewed-by: Marc Mutz --- chromium/base/unguessable_token.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chromium/base/unguessable_token.h b/chromium/base/unguessable_token.h index 83a22862608..20e6569f992 100644 --- a/chromium/base/unguessable_token.h +++ b/chromium/base/unguessable_token.h @@ -100,7 +100,7 @@ class BASE_EXPORT UnguessableToken { bool operator==(const UnguessableToken& other) const; bool operator!=(const UnguessableToken& other) const { - return !(token_ == other.token_); + return !(*this == other); } private: -- cgit v1.2.1