[projects/pld-builder.new] request_handler: check a mailed request as the bytes sent

arekm arekm at pld-linux.org
Thu Nov 12 10:29:37 CET 2026


commit 389ce5a31104551f35ba9b41daa82bb3d44c89ff
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Nov 12 10:28:16 2026 +0100

    request_handler: check a mailed request as the bytes sent
    
    The mail was read as latin-1 text and encoded back as utf-8 for gpg, so
    a request with any letter outside ASCII had a bad signature and was
    refused. Requests over http were not affected.

 PLD_Builder/request_handler.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/PLD_Builder/request_handler.py b/PLD_Builder/request_handler.py
index f2c0dbf..7a7922e 100644
--- a/PLD_Builder/request_handler.py
+++ b/PLD_Builder/request_handler.py
@@ -222,7 +222,8 @@ def handle_request_main(req, filename = None):
     return ret
 
 def main():
-    sys.exit(handle_request_main(sys.stdin.read()) != HTTPStatus.OK)
+    # the signature is over the bytes as sent
+    sys.exit(handle_request_main(sys.stdin.buffer.read()) != HTTPStatus.OK)
 
 if __name__ == '__main__':
     argparse.ArgumentParser(
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/389ce5a31104551f35ba9b41daa82bb3d44c89ff



More information about the pld-cvs-commit mailing list