Skip to content

Commit

Permalink
another effect of. passwords should not be in credential db keys
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed May 24, 2024
1 parent 2bead5f commit caae421
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sarracenia/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,11 @@ def get(self, urlstr):
# cache it as is... we dont want to validate every time

self.add(urlstr)
return False, self.credentials[urlstr]
if url and url.password:
k=urlstr.replace( f':{url.password}@', '@' )
else:
k=urlstr
return False, self.credentials[k]

def has(self, urlstr):
"""Return ``True`` if the Credential matching the urlstr is already in the CredentialDB.
Expand Down

0 comments on commit caae421

Please sign in to comment.