Check the REST API password in a way that is resistant to timing attacks (CVE-2021-34337)
Using basic string equality is vulnerable to timing attacks as it will short circuit at the first wrong character. Using hmac.compare_digest avoids that issue and will take the same time, regardless of whether the value is correct or not. This is only exploitable if an attacker can talk directly to the REST API, which by default is bound to localhost. Fixes #911.
Please register or sign in to comment