瀏覽代碼

We shouldn't do a password check if the user didn't give us one.

tags/v0.1^2
Ben Kurtovic 12 年之前
父節點
當前提交
fc060da51b
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      earwigbot/config.py

+ 3
- 3
earwigbot/config.py 查看文件

@@ -283,9 +283,9 @@ class BotConfig(object):
if not self._decryption_cipher:
key = getpass("Enter key to decrypt bot passwords: ")
self._decryption_cipher = Blowfish.new(sha256(key).digest())
signature = self.metadata["signature"]
if bcrypt.hashpw(key, signature) != signature:
raise RuntimeError("Incorrect password.")
signature = self.metadata["signature"]
if bcrypt.hashpw(key, signature) != signature:
raise RuntimeError("Incorrect password.")
for node, nodes in self._decryptable_nodes:
self._decrypt(node, nodes)



Loading…
取消
儲存