Skip to content

Commit

Permalink
store actual password when no pam negotiation has happened
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaschenk committed Oct 15, 2024
1 parent bfaafe7 commit c54468c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ibridges/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,13 @@ def write_pam_password(self):
connection = self.irods_session.pool.get_connection()
pam_passwords = self.irods_session.pam_pw_negotiated
if len(pam_passwords):
actual_password = pam_passwords[0]
else:
actual_password = self._password
if actual_password:
irods_auth_file = self.irods_session.get_irods_password_file()
with open(irods_auth_file, "w", encoding="utf-8") as authfd:
authfd.write(irods.password_obfuscation.encode(pam_passwords[0]))
authfd.write(irods.password_obfuscation.encode(actual_password))
else:
warnings.warn("WARNING -- unable to cache obfuscated password locally")
connection.release()
Expand Down

0 comments on commit c54468c

Please sign in to comment.