Skip to content

Posting config with invalid versioner type causes panic #9106

@calmh

Description

@calmh

Presumably it would be better to reject the configuration instead of crashing.

Panic at 2023-09-15T09:20:34+02:00
panic: creating versioner: requested versioning type "!@#!@(#*" does not exist

goroutine 343 [running]:
github.com/syncthing/syncthing/lib/model.(*model).addAndStartFolderLockedWithIgnores(_, {{0x140003cb860, 0x7}, {0x0, 0x0}, 0x1, {0x140003cb868, 0x2}, 0x0, {0x14001494960, ...}, ...}, ...)
        github.com/syncthing/syncthing/lib/model/model.go:420 +0xaa4
github.com/syncthing/syncthing/lib/model.(*model).addAndStartFolderLocked(_, {{0x140003cb860, 0x7}, {0x0, 0x0}, 0x1, {0x140003cb868, 0x2}, 0x0, {0x14001494960, ...}, ...}, ...)
        github.com/syncthing/syncthing/lib/model/model.go:353 +0x1a8
github.com/syncthing/syncthing/lib/model.(*model).restartFolder(_, {{0x140003ca5d8, 0x7}, {0x0, 0x0}, 0x1, {0x140003ca5e8, 0x2}, 0x0, {0x140014948c0, ...}, ...}, ...)
        github.com/syncthing/syncthing/lib/model/model.go:562 +0x440
github.com/syncthing/syncthing/lib/model.(*model).CommitConfiguration(_, {0x25, {0x14001b18ea0, 0x1, 0x1}, {0x140014978c0, 0x2, 0x2}, {0x1, {0x140003cafd0, ...}, ...}, ...}, ...)
        github.com/syncthing/syncthing/lib/model/model.go:3030 +0xa6c
github.com/syncthing/syncthing/lib/config.(*wrapper).notifyListener(_, {_, _}, {0x25, {0x14001b18ea0, 0x1, 0x1}, {0x140014978c0, 0x2, 0x2}, ...}, ...)
        github.com/syncthing/syncthing/lib/config/wrapper.go:343 +0x10c
github.com/syncthing/syncthing/lib/config.(*wrapper).notifyListeners.func1({0x1030ce978?, 0x1400019c180?})
        github.com/syncthing/syncthing/lib/config/wrapper.go:334 +0x88
created by github.com/syncthing/syncthing/lib/config.(*wrapper).notifyListeners in goroutine 53
        github.com/syncthing/syncthing/lib/config/wrapper.go:333 +0x130

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions