Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Gitlab token verification constant time (#165)
This prevents leakage of token information using timing attacks. A simple string comparison does not suffice here. It's also good practice to hash first to prevent leakage of the length of the secret, as `subtle.ConstantTimeCompare` has the undesired behavior of returning early if the length of the two given byte slices does not match. A hash function always generates a byte slice of constant length though.
- Loading branch information