mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-01-23 21:52:35 +01:00
increase time desync tolerance
This commit is contained in:
parent
028ffcc113
commit
2fb35f0e2b
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user