SwiftLocation
SwiftLocation copied to clipboard
horizontalAccuracy is not checked for negative value
In line 139 of GPSLocationRequest.swift there is a check for horizontalAccuracy
guard data.horizontalAccuracy <= options.accuracy.value else {
return .notMinAccuracy // accuracy level is below the minimum set
}
that doesn't take into account negative value.
According to Apple documentation:
A negative value indicates that the latitude and longitude are invalid. https://developer.apple.com/documentation/corelocation/cllocation/1423599-horizontalaccuracy