From 435c29755d108e8c83091685ca83fd18578ed052 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 4 Nov 2015 20:14:28 +0000 Subject: [PATCH] We haven't had cleartext passwords in the config for ages --- lib/config/config.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/config/config.go b/lib/config/config.go index 452021075..c5443d68f 100644 --- a/lib/config/config.go +++ b/lib/config/config.go @@ -21,7 +21,6 @@ import ( "strings" "github.com/syncthing/syncthing/lib/protocol" - "golang.org/x/crypto/bcrypt" ) const ( @@ -203,16 +202,6 @@ func (cfg *Configuration) prepare(myID protocol.DeviceID) { convertV11V12(cfg) } - // Hash old cleartext passwords - if len(cfg.GUI.Password) > 0 && cfg.GUI.Password[0] != '$' { - hash, err := bcrypt.GenerateFromPassword([]byte(cfg.GUI.Password), 0) - if err != nil { - l.Warnln("bcrypting password:", err) - } else { - cfg.GUI.Password = string(hash) - } - } - // Build a list of available devices existingDevices := make(map[protocol.DeviceID]bool) for _, device := range cfg.Devices {