- Allow zero-sized requests since they are sent by all current versions of Syncthing. - Stop sending zero-sized requests since that's stupid. --------- Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -483,7 +483,7 @@ func (c *rawConnection) dispatcherLoop() (err error) {
|
||||
if err := checkFilename(msg.Name); err != nil {
|
||||
return newProtocolError(err, msgContext)
|
||||
}
|
||||
if msg.Size <= 0 {
|
||||
if msg.Size < 0 {
|
||||
return newProtocolError(fmt.Errorf("request size %d too small", msg.Size), msgContext)
|
||||
}
|
||||
if msg.Size > MaxRequestSize {
|
||||
|
||||
Reference in New Issue
Block a user