Skip to content

Commit

Permalink
Relaxed bundleid regex
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinabraham committed Dec 3, 2023
1 parent 2aecb90 commit 88904e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mobsf/MobSF/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,13 @@
re_path(r'^ios/system_logs/$',
instance.system_logs,
name='ios_system_logs'),
re_path(r'^ios/download_data/(?P<bundle_id>([\w]*\.)+[\w]{2,155})$',
re_path(r'^ios/download_data/(?P<bundle_id>([\w]*\.)+[\w-]{2,155})$',
instance.download_data,
name='ios_download_data'),
re_path(r'^ios/instrument/$',
ios_tests_frida.ios_instrument,
name='ios_instrument'),
re_path(r'^ios/view_report/(?P<bundle_id>([\w]*\.)+[\w]{2,155})$',
re_path(r'^ios/view_report/(?P<bundle_id>([\w]*\.)+[\w-]{2,155})$',
ios_view_report.ios_view_report,
name='ios_view_report'),

Expand Down
2 changes: 1 addition & 1 deletion mobsf/MobSF/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ def strict_package_check(user_input):
For android package and ios bundle id
"""
pat = re.compile(r'^([\w]*\.)+[\w]{2,155}$')
pat = re.compile(r'^([\w]*\.)+[\w-]{2,155}$')
resp = re.match(pat, user_input)
if not resp or '..' in user_input:
logger.error('Invalid package name/bundle id/class name')
Expand Down

0 comments on commit 88904e8

Please sign in to comment.