mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 05:01:53 +08:00
Harden scan robustness and tests
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package services
|
||||
|
||||
import "io"
|
||||
|
||||
const maxServiceHTTPBodyBytes = 2 << 20
|
||||
|
||||
func readServiceHTTPBody(r io.Reader) ([]byte, error) {
|
||||
return io.ReadAll(io.LimitReader(r, maxServiceHTTPBodyBytes))
|
||||
}
|
||||
Reference in New Issue
Block a user