syncthing/lib/api
greatroar 97291c9184
lib/api: Fix and optimize csrfManager (#8329)
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.
2022-05-07 12:30:13 +02:00
..
auto all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
testdata cmd/syncthing, lib/api: Separate api/gui into own package (ref #4085) (#5529) 2019-03-26 19:53:58 +00:00
.gitignore lib/api: Ignore that one file that always shows up in git status 2020-03-07 11:46:54 +01:00
api.go all: Comments and cosmetics (#8218) 2022-04-02 20:36:19 +02:00
api_auth.go lib/config: Move the bcrypt password hashing to GUIConfiguration (#8028) 2021-11-08 13:32:04 +01:00
api_auth_test.go lib/config: Move the bcrypt password hashing to GUIConfiguration (#8028) 2021-11-08 13:32:04 +01:00
api_csrf.go lib/api: Fix and optimize csrfManager (#8329) 2022-05-07 12:30:13 +02:00
api_statics.go all: Unused args, retvals, assignments (#7926) 2021-09-08 00:11:16 +02:00
api_test.go lib/api: Fix and optimize csrfManager (#8329) 2022-05-07 12:30:13 +02:00
confighandler.go lib, gui: Default ignores for new folders (fixes #7428) (#7530) 2022-01-13 23:38:21 +01:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
mocked_config_test.go lib: Use counterfeiter to mock interfaces in tests (#7375) 2021-03-03 08:53:50 +01:00
support_bundle.go cmd/syncthing, lib/api: Separate api/gui into own package (ref #4085) (#5529) 2019-03-26 19:53:58 +00:00