diff options
author | Guillaume Le Vaillant <glv@posteo.net> | 2020-02-17 15:10:19 +0100 |
---|---|---|
committer | Guillaume Le Vaillant <glv@posteo.net> | 2020-02-17 15:10:19 +0100 |
commit | 82da832368c8aa1d2349b601d40ad42daec5a1e5 (patch) | |
tree | ada3b3b782e3b255c79a2e1c72a32501f1290b1c /src/rpc/rpc_payment_signature.cpp | |
parent | Merge pull request #6048 (diff) | |
download | monero-82da832368c8aa1d2349b601d40ad42daec5a1e5.tar.xz |
rpc: Add check for too old timestamps in payment signatures.
Diffstat (limited to '')
-rw-r--r-- | src/rpc/rpc_payment_signature.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rpc/rpc_payment_signature.cpp b/src/rpc/rpc_payment_signature.cpp index 2e8b54b4f..559f3a1e9 100644 --- a/src/rpc/rpc_payment_signature.cpp +++ b/src/rpc/rpc_payment_signature.cpp @@ -102,6 +102,11 @@ namespace cryptonote MDEBUG("Timestamp is in the future"); return false; } + if (ts < now - TIMESTAMP_LEEWAY) + { + MDEBUG("Timestamp is too old"); + return false; + } return true; } } |