mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-19 14:08:10 -07:00
block HTTP DoS attacks (#2239)
Block uses of the JS Fetch API to send HTTP message bodies that are also valid IRC. The constraint on such messages is that they must begin with a valid HTTP verb; we can detect this and reject them immediately.
This commit is contained in:
committed by
GitHub
parent
9791606f62
commit
a6df370bd9
@@ -63,6 +63,8 @@ var (
|
||||
chanTypes = "#"
|
||||
|
||||
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")
|
||||
)
|
||||
|
||||
// Server is the main Oragono server.
|
||||
|
||||
Reference in New Issue
Block a user