mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-08 09:07:44 +00:00
parent
72e082aaf5
commit
cd6099113f
@ -278,6 +278,11 @@ func LoadPrefs(filename string) (*Prefs, error) {
|
|||||||
return nil, fmt.Errorf("LoadPrefs open: %w", err) // err includes path
|
return nil, fmt.Errorf("LoadPrefs open: %w", err) // err includes path
|
||||||
}
|
}
|
||||||
if bytes.Contains(data, jsonEscapedZero) {
|
if bytes.Contains(data, jsonEscapedZero) {
|
||||||
|
// Tailscale 1.2.0 - 1.2.8 on Windows had a memory corruption bug
|
||||||
|
// in the backend process that ended up sending NULL bytes over JSON
|
||||||
|
// to the frontend which wrote them out to JSON files on disk.
|
||||||
|
// So if we see one, treat is as corrupt and the user will need
|
||||||
|
// to log in again. (better than crashing)
|
||||||
return nil, os.ErrNotExist
|
return nil, os.ErrNotExist
|
||||||
}
|
}
|
||||||
p, err := PrefsFromBytes(data, false)
|
p, err := PrefsFromBytes(data, false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user