From c45e3fa4d5f5691091ad5910c73dcecef16f2a9e Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Sat, 13 Sep 2014 22:06:25 +0100 Subject: [PATCH] Require username and password for authentication --- cmd/syncthing/gui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index 185964477..69205c866 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -136,7 +136,7 @@ func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) erro handler = withVersionMiddleware(handler) // Wrap everything in basic auth, if user/password is set. - if len(cfg.User) > 0 { + if len(cfg.User) > 0 && len(cfg.Password) > 0 { handler = basicAuthAndSessionMiddleware(cfg, handler) }