You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Trying to run Fortiguard URL Categorizer and get the following error:
Traceback (most recent call last):
File "/worker/Fortiguard/urlcategory.py", line 53, in <module>
URLCategoryAnalyzer().run()
File "/worker/Fortiguard/urlcategory.py", line 44, in run
'category': category_match.group(1)
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
To Reproduce
Steps to reproduce the behavior:
enable FortiGuard_URL_Category
analyze URL
Expected behavior
A category is returned from the analyzer.
Complementary information
If applicable, add screenshots and any additional information that might help explain your problem.
I delved further into the source of the error, and it seems to be because requests are being blocked by fortiguard, as a result the request output is <Response [403]>. Since the subsequent line in the code (category_match = re.search(pattern, req.text, flags=0)) erroneously assumes the request was successful (and not <Response [403]>), category_match ends up being None - hence the observed AttributeError above
Describe the bug
Trying to run Fortiguard URL Categorizer and get the following error:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A category is returned from the analyzer.
Complementary information
If applicable, add screenshots and any additional information that might help explain your problem.
Work environment
Possible solutions
If applicable, indicate possible solutions to the problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: