increase time desync tolerance

This commit is contained in:
creeper123123321 2021-09-04 11:01:49 -03:00
parent 028ffcc113
commit 2fb35f0e2b

View File

@ -26,7 +26,7 @@ class WebLogin : WebState {
"offline_login" -> {
if (!sha512Hex(msg.toByteArray(Charsets.UTF_8)).startsWith("00000")) throw StacklessException("PoW failed")
if ((obj.getAsJsonPrimitive("date").asLong - System.currentTimeMillis())
.absoluteValue > Duration.ofSeconds(20).toMillis()
.absoluteValue > Duration.ofSeconds(60).toMillis()
) {
throw StacklessException("Invalid PoW date")
}