mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
improve robustness of timestamp parsing (#2250)
* Clamp CHATHISTORY timestamp selectors to be in [0, MaxInt64] * Convert everything to UTC up front (probably a no-op)
This commit is contained in:
parent
2cf569c5d9
commit
54b17b0700
2 changed files with 12 additions and 0 deletions
|
|
@ -65,6 +65,9 @@ var (
|
|||
throttleMessage = "You have attempted to connect too many times within a short duration. Wait a while, and you will be able to connect."
|
||||
|
||||
httpVerbs = utils.SetLiteral("CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE")
|
||||
|
||||
unixEpoch = time.Unix(0, 0).UTC()
|
||||
year2262Problem = time.Unix(0, 1<<63-1).UTC() // this is the maximum time for which (*time.Time).UnixNano() is well-defined
|
||||
)
|
||||
|
||||
// Server is the main Oragono server.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue