Open paragonie-scott opened 6 years ago
Am I missing something here?
The nonce in oauth is more used to prevent the service from processing the same request multiple times and not to prevent some security issue.
Worst case means valid requests will be flagged as invalid.
Without a way for the attacker to use their own new nonce and ability to create a new valid signature with it what good is it to the attacker.
Not arguing it's a suboptimal solution
Am I missing something here?
Nope. I just wanted to call attention to it and suggest using random_int()
and bin2hex(random_bytes(16))
respectively.
Offending code:
How to do it instead:
https://paragonie.com/blog/2015/07/how-safely-generate-random-strings-and-integers-in-php