Skip to content

Commit

Permalink
Update pam/internal/gdm/conversation.go
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Trevisan <[email protected]>
  • Loading branch information
adombeck and 3v1n0 committed Jan 24, 2025
1 parent ff194c4 commit 878ce45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pam/internal/gdm/conversation.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ func SendData(pamMTx pam.ModuleTransaction, d *Data) (*Data, error) {
}
if log.IsLevelEnabled(log.DebugLevel) && jsonValue != nil &&
gdmData != nil && gdmData.Type == DataType_pollResponse {
jsonValue = secretRegex.ReplaceAll(jsonValue, []byte(`"secret":"**************"`))
jsonValue = secretRegexOld.ReplaceAll(jsonValue, []byte(`"secret":"**************"`))
maskedValue := []byte(`"secret":"**************"`)
jsonValue = secretRegex.ReplaceAllLiteral(jsonValue, maskedValue)
jsonValue = secretRegexOld.ReplaceAllLiteral(jsonValue, maskedValue)
}
if jsonValue != nil {
log.Debugf(context.TODO(), "Got from GDM: %s", jsonValue)
Expand Down

0 comments on commit 878ce45

Please sign in to comment.