mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-14 09:14:10 +00:00
97291c9184
An off-by-one error could cause tokens to be forgotten. Suppose tokens := []string{"foo", "bar", "baz", "quux"} i := 2 token := tokens[i] // token == "baz" Then, after copy(tokens[1:], tokens[:i+1]) tokens[0] = token we have tokens == []string{"baz", "foo", "bar", "baz"} The short test actually relied on this bug. |
||
---|---|---|
.. | ||
auto | ||
testdata | ||
.gitignore | ||
api_auth_test.go | ||
api_auth.go | ||
api_csrf.go | ||
api_statics.go | ||
api_test.go | ||
api.go | ||
confighandler.go | ||
debug.go | ||
mocked_config_test.go | ||
support_bundle.go |