comparison pkg/imports/config.go @ 3515:c64c47ff2ab1 password

import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 29 May 2019 09:56:42 +0200
parents 4882f01c8592
children 8b75ac5e243e
comparison
equal deleted inserted replaced
3510:4d7b481e1d39 3515:c64c47ff2ab1
267 267
268 if k.Valid && v.Valid { 268 if k.Valid && v.Valid {
269 if pc.Attributes == nil { 269 if pc.Attributes == nil {
270 pc.Attributes = common.Attributes{} 270 pc.Attributes = common.Attributes{}
271 } 271 }
272 pc.Attributes.Set(k.String, v.String) 272 // Prevent sending the `password` back to the client.
273 // (See importconfig.infoImportConfig() for the other place
274 // where this is done.)
275 if k.String != "password" {
276 pc.Attributes.Set(k.String, v.String)
277 }
273 } 278 }
274 } 279 }
275 280
276 if err := rows.Err(); err != nil { 281 if err := rows.Err(); err != nil {
277 return err 282 return err