time new line char from encryption key

This commit is contained in:
Prabhat Khera
2021-12-06 21:44:10 +13:00
parent ca91db6bd8
commit fa921f5ae8
+2 -2
View File
@@ -59,7 +59,7 @@ func initFileService(dataStorePath string) portainer.FileService {
return fileService
}
func initDataStore(dataStorePath string, encryptionKey string, rollback bool, fileService portainer.FileService, shutdownCtx context.Context) portainer.DataStore {
func initDataStore(dataStorePath, encryptionKey string, rollback bool, fileService portainer.FileService, shutdownCtx context.Context) portainer.DataStore {
store := bolt.NewStore(dataStorePath, fileService, encryptionKey)
err := store.Open()
if err != nil {
@@ -471,7 +471,7 @@ func initSecretKey(fileName string) string {
return ""
}
return string(content)
return strings.TrimSuffix(string(content), "\n")
}
func buildServer(flags *portainer.CLIFlags) portainer.Server {