File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1195,6 +1195,11 @@ def paged_searches_supported?
1195
1195
@server_caps [ :supportedcontrol ] . include? ( Net ::LDAP ::LDAPControls ::PAGED_RESULTS )
1196
1196
end
1197
1197
1198
+ # Mask auth password
1199
+ def inspect
1200
+ super . gsub @auth [ :password ] , "*******" if @auth [ :password ]
1201
+ end
1202
+
1198
1203
private
1199
1204
1200
1205
# Yields an open connection if there is one, otherwise establishes a new
Original file line number Diff line number Diff line change @@ -57,4 +57,10 @@ def test_instrument_search_with_size
57
57
assert_equal "(uid=user1)" , payload [ :filter ]
58
58
assert_equal result . size , payload [ :size ]
59
59
end
60
+
61
+ def test_obscure_auth
62
+ password = "opensesame"
63
+ @subject . auth "joe_user" , password
64
+ assert_not_include ( @subject . inspect , password )
65
+ end
60
66
end
You can’t perform that action at this time.
0 commit comments