You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(PUP-11507) Fix macOS agent failing to retrieve password hash bug
Added a third parameter, the user's name, to get_salted_sha512_pbkdf2() so the user's name can be included in the error messages for easier debugging. Additionally, checks for nil values for the salt and entropy fields are added to prevent unpack() being called with nil, which initially caused the bug.
raisePuppet::Error,'Puppet has tried to read an incorrect value from the ' +
216
-
"SALTED-SHA512-PBKDF2 hash. Acceptable fields are 'salt', " +
217
-
"'entropy', or 'iterations'."
219
+
raisePuppet::Error,"Puppet has tried to read an incorrect value from the user #{user_name} in the SALTED-SHA512-PBKDF2 hash. Acceptable fields are 'salt', 'entropy', or 'iterations'."
it"should raise an error if a field other than 'entropy', 'salt', or 'iterations' is passed"do
843
-
expect{provider.class.get_salted_sha512_pbkdf2('othervalue',pbkdf2_embedded_bplist_hash)}.toraise_error(Puppet::Error,/Puppet has tried to read an incorrect value from the SALTED-SHA512-PBKDF2 hash. Acceptable fields are 'salt', 'entropy', or 'iterations'/)
843
+
expect{provider.class.get_salted_sha512_pbkdf2('othervalue',pbkdf2_embedded_bplist_hash,'test_user')}.toraise_error(Puppet::Error,/Puppet has tried to read an incorrect value from the user test_user in the SALTED-SHA512-PBKDF2 hash. Acceptable fields are 'salt', 'entropy', or 'iterations'/)
0 commit comments