mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-27 00:28:55 +02:00
Merge pull request #1083 from dmach/fix/ssh-auth-unset-pass
Fix crash when 'pass' is not set in the config file
This commit is contained in:
@@ -166,6 +166,9 @@ class ObfuscatedConfigFileCredentialsManager(
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def decode_password(cls, password):
|
def decode_password(cls, password):
|
||||||
|
if password is None:
|
||||||
|
# avoid crash on encoding None when 'pass' is not specified in the config
|
||||||
|
return None
|
||||||
compressed_pw = base64.b64decode(password.encode("ascii"))
|
compressed_pw = base64.b64decode(password.encode("ascii"))
|
||||||
return bz2.decompress(compressed_pw).decode("ascii")
|
return bz2.decompress(compressed_pw).decode("ascii")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user