verify_access_token in Identity Service does this so probably we should do it here too.
Depends on D9241
Differential D9242
[services-lib] Use constant-time-eq for token verification bartek on Sep 20 2023, 2:50 AM. Authored by Tags None Referenced Files
Details verify_access_token in Identity Service does this so probably we should do it here too. Depends on D9241 I did some simple comparisons and it seems to work fine.
Diff Detail
Event TimelineComment Actions I'm not really familiar with this stuff, so I might be completely wrong but: From the contant_time_eq docs:
We don't check the length anywhere so couldn't the attacker start by sending a one-byte token, and after they find a match send a two-byte token, etc...? For context the comment from https://phab.comm.dev/D4199?id=13456#inline-26218:
Comment Actions
i'm not sure what you mean by this. an attacker could learn the length of the token, but that's not a big deal - there'd still be enough entropy for a proper token |