aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2020-02-17 15:10:19 +0100
committerGuillaume Le Vaillant <glv@posteo.net>2020-02-17 15:10:19 +0100
commit82da832368c8aa1d2349b601d40ad42daec5a1e5 (patch)
treeada3b3b782e3b255c79a2e1c72a32501f1290b1c
parentMerge pull request #6048 (diff)
downloadmonero-82da832368c8aa1d2349b601d40ad42daec5a1e5.tar.xz
rpc: Add check for too old timestamps in payment signatures.
-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;
}
}