What changed, and why it matters
This is a one-line bug fix in Krux's QR code parser. A previous change accidentally broke Compact SeedQR support by trying to decode binary QR data as text before checking the format. The fix moves the decode step inside a try block so binary data is handled safely. There is no direct evidence this is a security vulnerability; it appears to be a functionality regression.
Treat as a routine functional bug fix. Review related tests for Compact SeedQR and binary QR handling. No immediate security response is indicated by the available evidence.
Security signals we found
Regression fix for QR format detection
Binary QR data handling change
No explicit security context in commit message
Evidence from the diff
The commit moves data = data.decode() if isinstance(data, bytes) else data inside a try/except block in detect_format(). Previously, calling .decode() on raw binary Compact SeedQR data would raise a UnicodeDecodeError, causing format detection to fail. The fix ensures binary data is only decoded when possible, and exceptions are caught. This restores Compact SeedQR parsing but does not by itself indicate an exploitable security flaw.
Changed components
src/krux/qr.pydetect_format()Compact SeedQR parsingInspect captured patch +1 / −1
diff --git a/src/krux/qr.py b/src/krux/qr.py
index b46f403..b37cb14 100644
--- a/src/krux/qr.py
+++ b/src/krux/qr.py
@@ -383,8 +383,8 @@ def parse_pmofn_qr_part(data):
def detect_format(data):
"""Detects the QR format of the given data"""
qr_format = FORMAT_NONE
- data = data.decode() if isinstance(data, bytes) else data
try:
+ data = data.decode() if isinstance(data, bytes) else data
if data.startswith("p"):
header = data.split(" ")[0]
if "of" in header and header[1:].split("of")[0].isdigit():
Why this scored 23/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.