Skip to content

Commit 43e9a30

Browse files
authored
Merge pull request #1404 from cruelsmith/fix_role_sensitive_pw
Fix wrong Sensitive handling for updating role passwords
2 parents c5df630 + 5e3744e commit 43e9a30

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

manifests/server/role.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
$pwd_hash_sql = postgresql::postgresql_password(
167167
$username,
168168
$password_hash,
169-
$password_hash =~ Sensitive[String],
169+
false,
170170
$hash,
171171
$salt,
172172
)

spec/defines/server/role_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@
5858

5959
it 'has alter role for "test" user with password as ****' do
6060
expect(subject).to contain_postgresql_psql('ALTER ROLE test ENCRYPTED PASSWORD ****')
61-
.with('command' => sensitive(%(ALTER ROLE "test" ENCRYPTED PASSWORD 'Sensitive [value redacted]')),
62-
# FIXME: This is obviously wrong ^^^^^^^^^^^^^^^^^^^^^^^^^^
61+
.with('command' => sensitive(%(ALTER ROLE "test" ENCRYPTED PASSWORD 'md5b6f7fcbbabb4befde4588a26c1cfd2fa')),
6362
'sensitive' => 'true',
64-
'unless' => sensitive(%(SELECT 1 FROM pg_shadow WHERE usename = 'test' AND passwd = 'Sensitive [value redacted]')),
65-
# FIXME: This is obviously wrong ^^^^^^^^^^^^^^^^^^^^^^^^^^
63+
'unless' => sensitive(%(SELECT 1 FROM pg_shadow WHERE usename = 'test' AND passwd = 'md5b6f7fcbbabb4befde4588a26c1cfd2fa')),
6664
'port' => '5432')
6765
end
6866
end

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy