mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-26 17:48:15 -07:00
Cleanup
This commit is contained in:
@@ -3387,12 +3387,12 @@ class ReticulumGitNode():
|
|||||||
sig_length = RNS.Identity.SIGLENGTH//8
|
sig_length = RNS.Identity.SIGLENGTH//8
|
||||||
limit = self.WORK_DOC_LIMIT
|
limit = self.WORK_DOC_LIMIT
|
||||||
|
|
||||||
if not signature: return self.RES_INVALID_REQ.to_bytes(1, "big") + b"No signature provided"
|
if not signature: return self.RES_INVALID_REQ.to_bytes(1, "big") + b"No signature provided"
|
||||||
if signature and not len(signature) == sig_length: return self.RES_INVALID_REQ.to_bytes(1, "big") + b"Invalid signature length"
|
if signature and not len(signature) == sig_length: return self.RES_INVALID_REQ.to_bytes(1, "big") + b"Invalid signature length"
|
||||||
if not remote_identity.validate(signature, signed_data): return self.RES_INVALID_REQ.to_bytes(1, "big") + b"Invalid signature"
|
if not remote_identity.validate(signature, signed_data): return self.RES_INVALID_REQ.to_bytes(1, "big") + b"Invalid signature"
|
||||||
if len(title)+len(content)+len(format_type) > limit: return self.RES_INVALID_REQ.to_bytes(1, "big") + b"Content limit exceeded"
|
if len(title)+len(content)+len(format_type) > limit: return self.RES_INVALID_REQ.to_bytes(1, "big") + b"Content limit exceeded"
|
||||||
if not title: return self.RES_INVALID_REQ.to_bytes(1, "big") + b"Title is required"
|
if not title: return self.RES_INVALID_REQ.to_bytes(1, "big") + b"Title is required"
|
||||||
if not content: return self.RES_INVALID_REQ.to_bytes(1, "big") + b"Content is required"
|
if not content: return self.RES_INVALID_REQ.to_bytes(1, "big") + b"Content is required"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
proposed_path = os.path.join(work_path, "proposed")
|
proposed_path = os.path.join(work_path, "proposed")
|
||||||
|
|||||||
Reference in New Issue
Block a user