Skip to content

Commit 43e837a

Browse files
Further Improvements to password masking in powerconnect.rb from #1212 (#3405)
* Further Improvements to password masking in powerconnect.rb from #1212 In both the 3400 and 6200 series the previous regex would miss the following passwords: password 123456789abcdef0123456789abcdef0 encrypted enable password 123456789abcdef0123456789abcdef0 encrypted * Update CHANGELOG.md powerconnect: Hide enable, and line secrets * Update CHANGELOG.md powerconnect: Hide enable, and line secrets. Further Fixes #1212 (#clifcox) * Fix Changelog --------- Co-authored-by: Robert Cheramy <r.cheramy@netze-bw.de>
1 parent 87269cb commit 43e837a

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
1111
### Changed
1212

1313
### Fixed
14+
- powerconnect: Hide enable, and line secrets. Further Fixes #1212 (#clifcox)
1415

1516

1617
## [0.32.0 – 2025-02-17]

lib/oxidized/model/powerconnect.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class PowerConnect < Oxidized::Model
1515
end
1616

1717
cmd :secret do |cfg|
18-
cfg.gsub! /^(username \S+ password (?:encrypted )?)\S+(.*)/, '\1<hidden>\2'
18+
cfg.gsub! /^((?:enable |username \S+ )?password (?:level\s\d{1,2} |encrypted ){,2})\S+(.*)/, '\1<hidden>\2'
1919
cfg.gsub! /^(tacacs-server key) \S+/, '\\1 <secret hidden>'
2020
cfg
2121
end

0 commit comments

Comments
 (0)