1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-05 18:50:09 +02:00

Improve recursion warning, thx Hans!

This commit is contained in:
Jochen Sprickerhof 2022-04-29 14:36:41 +02:00 committed by Hans-Christoph Steiner
parent 94ccd022c4
commit 925cdbe542

View File

@ -109,8 +109,7 @@ def get_embedded_classes(apkfile, depth=0):
:return: set of Java classes names as string
"""
if depth > 10: # zipbomb protection
logging.error(_('max recursion depth in zip file reached: %s') % apkfile)
return set()
return {_('Max recursion depth in ZIP file reached: %s') % apkfile}
apk_regex = re.compile(r'.*\.apk')
class_regex = re.compile(r'classes.*\.dex')