aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-04-04 12:49:02 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-04-04 12:49:02 -0500
commitad5200e440d1d3bead060bcfb6fec8f06755cb6a (patch)
tree1111825430935ded8d5e20fafb6b430321bec14b /src/rpc
parentMerge pull request #6339 (diff)
parentrpc: Add check for too old timestamps in payment signatures. (diff)
downloadmonero-ad5200e440d1d3bead060bcfb6fec8f06755cb6a.tar.xz
Merge pull request #6342
82da832 rpc: Add check for too old timestamps in payment signatures. (glv2)
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/rpc_payment_signature.cpp5
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;
}
}