Ticket #3648: 無題.txt

File 無題.txt, 582 bytes (added by cocteau, 11 years ago)

credentials.py.patch

Line 
1--- /usr/lib64/python2.4/site-packages/twisted/cred/credentials.py      2009-01-21 11:09:21.000000000 +0900
2+++ credentials.py      2009-02-09 11:04:22.000000000 +0900
3@@ -393,12 +393,14 @@
4 class UsernameHashedPassword:
5     implements(IUsernameHashedPassword)
6
7+    import crypt
8+
9     def __init__(self, username, hashed):
10         self.username = username
11         self.hashed = hashed
12
13     def checkPassword(self, password):
14-        return self.hashed == password
15+        return self.hashed == crypt.crypt(password, self.hashed)
16
17
18 class UsernamePassword: