mirror of
https://gitea.com/gitea/runner.git
synced 2026-08-30 07:47:45 +00:00
+3
@@ -541,6 +541,9 @@ func ServeAgent(agent Agent, c io.ReadWriter) error {
|
||||
return err
|
||||
}
|
||||
l := binary.BigEndian.Uint32(length[:])
|
||||
if l == 0 {
|
||||
return fmt.Errorf("agent: request size is 0")
|
||||
}
|
||||
if l > maxAgentResponseBytes {
|
||||
// We also cap requests.
|
||||
return fmt.Errorf("agent: request too large: %d", l)
|
||||
|
||||
Reference in New Issue
Block a user