From 02ffbbdb93e5ddd1eaaaf6f5d0536148c109637e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=B6hn?= Date: Thu, 11 Jun 2026 18:11:08 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=BE=20fix=20scanner.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scanner.py uses an internal api from androguard, that internal api changed in androguard 4.1.4. This makes sure scanner handles this change correctly. --- fdroidserver/scanner.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fdroidserver/scanner.py b/fdroidserver/scanner.py index 475be605..a73f5410 100644 --- a/fdroidserver/scanner.py +++ b/fdroidserver/scanner.py @@ -690,7 +690,13 @@ def scan_binary(apkfile, allow_debuggable=False): logging.info(_('Scanning APK for extra signing blocks.')) a = common.get_androguard_APK(str(apkfile)) a.parse_v2_v3_signature() - for b in a._v2_blocks: + + v2_block_ids = ( + a._v2_blocks.keys() + if isinstance(a._v2_blocks, dict) + else [b.id for b in a._v2_blocks] + ) + for b in v2_block_ids: if b in APK_SIGNING_BLOCK_IDS: logging.debug( f"Problem: found extra signing block '{APK_SIGNING_BLOCK_IDS[b]}'"