mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 18:41:59 -07:00
Be lenient towards malformed UPnP IGD UUIDs (fixes #890)
This commit is contained in:
parent
3f842221f7
commit
198cbacc3e
@ -636,7 +636,7 @@ nextBlock:
|
||||
continue nextBlock
|
||||
}
|
||||
|
||||
// Select the least busy device to pull the block frop.model. If we found no
|
||||
// Select the least busy device to pull the block from. If we found no
|
||||
// feasible device at all, fail the block (and in the long run, the
|
||||
// file).
|
||||
potentialDevices := p.model.availability(p.folder, state.file.Name)
|
||||
|
@ -236,8 +236,7 @@ func handleSearchResponse(deviceType string, knownDevices []*IGD, resp []byte, l
|
||||
deviceUUID := strings.TrimLeft(strings.Split(deviceUSN, "::")[0], "uuid:")
|
||||
matched, err := regexp.MatchString("[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", deviceUUID)
|
||||
if !matched {
|
||||
l.Infoln("Invalid IGD response: invalid device UUID " + deviceUUID)
|
||||
return
|
||||
l.Infoln("Invalid IGD response: invalid device UUID", deviceUUID, "(continuing anyway)")
|
||||
}
|
||||
|
||||
// Don't re-add devices that are already known
|
||||
|
Loading…
Reference in New Issue
Block a user