cve-search / vulnerability-lookup

Vulnerability-Lookup facilitates quick correlation of vulnerabilities from various sources, independent of vulnerability IDs, and streamlines the management of Coordinated Vulnerability Disclosure (CVD).
https://vulnerability.circl.lu
GNU Affero General Public License v3.0
136 stars 16 forks source link

Error when accessing to main page: #79

Closed FafnerKeyZee closed 3 weeks ago

FafnerKeyZee commented 1 month ago

Hello,

When reaching the / url we got the following error:

2024-10-23 14:07:11,336 website.web.bootstrap ERROR:Exception on / [GET]
Traceback (most recent call last):
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/flask/app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/flask/app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/flask_restx/api.py", line 672, in error_router
    return original_handler(e)
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "/home/fafner/vulnerability-lookup/website/web/views/home.py", line 150, in search
    return render_template("search.html")
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/flask/templating.py", line 150, in render_template
    return _render(app, template, context)
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/flask/templating.py", line 131, in _render
    rv = template.render(context)
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/home/fafner/vulnerability-lookup/website/web/templates/search.html", line 2, in top-level template code
    {% import 'vulnerability_templates.html' as vuln_templates with context %}
  File "/home/fafner/vulnerability-lookup/website/web/templates/main.html", line 187, in top-level template code
    {% block content %}{% endblock%}
  File "/home/fafner/vulnerability-lookup/website/web/templates/search.html", line 301, in block 'content'
    fetch("{{ url_for('apiv1.sighting_sightings_list', type='exploited') }}")
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/flask/app.py", line 1084, in url_for
    return self.handle_url_build_error(error, endpoint, values)
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/flask/app.py", line 1073, in url_for
    rv = url_adapter.build(  # type: ignore[union-attr]
  File "/home/fafner/.cache/pypoetry/virtualenvs/vulnerabilitylookup-bHufooiK-py3.10/lib/python3.10/site-packages/werkzeug/routing/map.py", line 924, in build
    raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'apiv1.sighting_sightings_list' with values ['type']. Did you mean 'apiv1.api_last' instead?
cedricbonhomme commented 4 weeks ago

Hello,

The endpoint 'apiv1.sighting_sightings_list' is valid but not found on your installation.

Do you have enabled user_accounts by chance ? It's here: https://github.com/cve-search/vulnerability-lookup/blob/main/config/generic.json.sample#L11

FafnerKeyZee commented 4 weeks ago

It's set to false on my conf...

cedricbonhomme commented 3 weeks ago

I've pushed something that disable the loading of comments, bundles and sightings on the home page when user_accounts is set to False. Honestly a large amount of the future features will require the support of user accounts (authentication, API endpoint for bundles, sightings, etc.). This means at some point you will be stuck without this configuration.