Any transactions that fail based on some conditions that may change in the future are not safe to be executed again later (e.g. transactions that are based on others actions, or time-dependent etc).
In the current implementation, once the low-level call is failed, the whole tx will be reverted and so that nonces[userAddress] will remain unchanged.
As a result, the same tx can be replayed by anyone, using the same signature.
Replay Attacks: Attackers can reuse signatures if the nonce remains unchanged after a failed transaction.
manual
Failed txs should still increase the nonce.
While implementating the change above, consider adding one more check to require sufficient gas to be paid, to prevent "insufficient gas griefing attack" as described in this article.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.