more appropriate error codes
This commit is contained in:
parent
91119103a9
commit
e241faf766
6
motm.py
6
motm.py
|
@ -78,15 +78,15 @@ class MessageBoard:
|
|||
|
||||
client_hash = self.env["TLS_CLIENT_HASH"]
|
||||
if post is not None and post.cert_hash != client_hash:
|
||||
print("60", "You are not authorized to modify this post.")
|
||||
print("61", "You are not authorized to modify this post.")
|
||||
return False
|
||||
|
||||
client_cert = self.db.hash_to_cert(client_hash)
|
||||
if client_cert is None:
|
||||
print("60", "Cert hash not in db.")
|
||||
print("61", "Cert hash not in db.")
|
||||
return False
|
||||
if self.ca.verify_cert(client_cert) != True:
|
||||
print("60", "You are banned.")
|
||||
print("61", "You are banned.")
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue