DefectDojo / django-DefectDojo

DevSecOps, ASPM, Vulnerability Management. All on one platform.
https://defectdojo.com
BSD 3-Clause "New" or "Revised" License
3.71k stars 1.55k forks source link

API v2 engagement broken #730

Closed wurstbrot closed 5 years ago

wurstbrot commented 6 years ago

Please use the following template when submitting issues:

Issue Type

Description

I try to fetch engagements via APIv2, resulting in an error.

Install

DefectDojo Version

v. 1.5.2

Steps to Reproduce

I start a fresh docker container with defectdojo/mysql I create a product. I set up the API (see https://github.com/aaronweaver/defectdojo_api) in version 1.1.3 and import a report. I go to engagement and accept one finding. I go to the swagger-api, authorize and try to use http://localhost:8000/api/v2/engagements/1/?id=1.

ImproperlyConfigured at /api/v2/engagements/1/ Could not resolve URL for hyperlinked relationship using view name "risk_acceptance-detail". You may have failed to include the related model in your API, or incorrectly configured the lookup_field attribute on this field.

Request Method: GET Request URL: http://localhost:8000/api/v2/engagements/1/?id=1 Django Version: 1.11.11 Python Executable: /usr/bin/python Python Version: 2.7.12 Python Path: ['/opt/django-DefectDojo', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/opt/django-DefectDojo'] Server time: Fri, 31 Aug 2018 05:37:40 +0000 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'polymorphic', 'overextends', 'django.contrib.admin', 'django.contrib.humanize', 'gunicorn', 'tastypie', 'auditlog', 'dojo', 'tastypie_swagger', 'watson', 'tagging', 'custom_field', 'imagekit', 'multiselectfield', 'rest_framework', 'rest_framework.authtoken', 'rest_framework_swagger', 'dbbackup') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'dojo.middleware.LoginRequiredMiddleware', 'dojo.middleware.TimezoneMiddleware')

Traceback:

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py" in inner

  1. response = get_response(request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _legacy_get_response

  1. response = self._get_response(request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response

  1. response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response

  1. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view

  1. return view_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/rest_framework/viewsets.py" in view

  1. return self.dispatch(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py" in dispatch

  1. response = self.handle_exception(exc)

File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py" in handle_exception

  1. self.raise_uncaught_exception(exc)

File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py" in dispatch

  1. response = handler(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/rest_framework/mixins.py" in retrieve

  1. return Response(serializer.data)

File "/usr/local/lib/python2.7/dist-packages/rest_framework/serializers.py" in data

  1. ret = super(Serializer, self).data

File "/usr/local/lib/python2.7/dist-packages/rest_framework/serializers.py" in data

  1. self._data = self.to_representation(self.instance)

File "/usr/local/lib/python2.7/dist-packages/rest_framework/serializers.py" in to_representation

  1. ret[field.field_name] = field.to_representation(attribute)

File "/usr/local/lib/python2.7/dist-packages/rest_framework/relations.py" in to_representation

  1. for value in iterable

File "/usr/local/lib/python2.7/dist-packages/rest_framework/relations.py" in to_representation

  1. raise ImproperlyConfigured(msg % self.view_name)

Exception Type: ImproperlyConfigured at /api/v2/engagements/1/ Exception Value: Could not resolve URL for hyperlinked relationship using view name "risk_acceptance-detail". You may have failed to include the related model in your API, or incorrectly configured the lookup_field attribute on this field. Request information: USER: admin

GET: id = u'1'

POST: No POST data

FILES: No FILES data

COOKIES: csrftoken = 'TDNqIQ92f8r5p1azQL4XYsLYIkzDnvmqoXKXuupMttsPwQLE9xEdyp9xPJc3t352' sessionid = 'dnk6dvx42sijis6epk5k2xm4yaw92bw8'

META: CONTENT_LENGTH = '' CONTENT_TYPE = 'text/plain' CSRF_COOKIE = 'TDNqIQ92f8r5p1azQL4XYsLYIkzDnvmqoXKXuupMttsPwQLE9xEdyp9xPJc3t352' DBNAME = '' DJANGO_DEBUG = 'True' DJANGO_SETTINGS_MODULE = 'dojo.settings.settings' DOJO_ADMIN_EMAIL = 'admin@dojo.local' DOJO_ADMIN_NAME = "'Admin User'" DOJO_ADMIN_PASSWORD = 'admin' DOJO_ADMIN_USER = 'admin' DOJO_MYSQL_HOST = 'mysql' DOJO_MYSQL_PORT = '3306' DOJO_URL_PREFIX = '' GATEWAY_INTERFACE = 'CGI/1.1' HOME = '/home/dojo' HOSTNAME = 'aa0eb4b92e41' HTTP_ACCEPT = 'application/json' HTTP_ACCEPT_ENCODING = 'gzip, deflate, br' HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.9,de;q=0.8' HTTP_AUTHORIZATION = 'Token e3204e69232e220bd2984d4382dfa7018b66bef9' HTTP_CONNECTION = 'keep-alive' HTTP_COOKIE = 'sessionid=dnk6dvx42sijis6epk5k2xm4yaw92bw8; csrftoken=TDNqIQ92f8r5p1azQL4XYsLYIkzDnvmqoXKXuupMttsPwQLE9xEdyp9xPJc3t352' HTTP_HOST = 'localhost:8000' HTTP_REFERER = 'http://localhost:8000/api/v2/doc/' HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/68.0.3440.106 Chrome/68.0.3440.106 Safari/537.36' HTTP_X_CSRFTOKEN = 'bCUTTCgx6Z5iuZ5sO3i6QBZTs9hN9Su0GWRqFgwhkk62BOGx7PSmqynszyUdfqdC' LOAD_SAMPLE_DATA = 'True' MYSQL_DATABASE = 'dojo' MYSQLPASSWORD = 'Q#P)ZQ0KVTBFzYWsmN_jV!R6x$C4Kfj' MYSQL_USER = 'dojodb' PATH = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PATH_INFO = u'/api/v2/engagements/1/' PWD = '/opt/django-DefectDojo' QUERY_STRING = 'id=1' REMOTE_ADDR = '172.18.0.1' REMOTE_HOST = '' REQUEST_METHOD = 'GET' RUN_MAIN = 'true' RUN_TIERED = 'True' SCRIPT_NAME = u'' SERVER_NAME = 'aa0eb4b92e41' SERVER_PORT = '8000' SERVER_PROTOCOL = 'HTTP/1.1' SERVER_SOFTWARE = 'WSGIServer/0.1 Python/2.7.12' SQLHOST = '' SQLPORT = '' SQLPWD = '' SQLUSER = '' TZ = 'America/Chicago' wsgi.errors = <open file '', mode 'w' at 0x7f6e5f1831e0> wsgi.file_wrapper = '' wsgi.input = <socket._fileobject object at 0x7f6e33a76bd0> wsgi.multiprocess = False wsgi.multithread = True wsgi.run_once = False wsgi.url_scheme = 'http' wsgi.version = u'(1, 0)'

Settings: Using settings module dojo.settings.settings ABSOLUTE_URL_OVERRIDES = {} ADMINS = u"('Your Name', 'your.name@yourdomain')" ALLOWED_HOSTS = [] APPEND_SLASH = True AUTHENTICATION_BACKENDS = [u'django.contrib.auth.backends.ModelBackend'] AUTH_PASSWORD_VALIDATORS = u'****' AUTH_USER_MODEL = u'auth.User' CACHES = {u'default': {u'BACKEND': u'django.core.cache.backends.locmem.LocMemCache'}} CACHE_MIDDLEWARE_ALIAS = u'default' CACHE_MIDDLEWARE_KEY_PREFIX = u'****' CACHE_MIDDLEWARE_SECONDS = 600 CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml'] CELERY_BEAT_SCHEDULE = {'add-alerts': {'task': 'dojo.tasks.add_alerts', 'args': [datetime.timedelta(0, 3600)], 'schedule': datetime.timedelta(0, 3600)}, 'dedupe-delete': {'task': 'dojo.tasks.async_dupe_delete', 'args': [datetime.timedelta(1)], 'schedule': datetime.timedelta(1)}} CELERY_BEAT_SCHEDULE_FILENAME = '/opt/django-DefectDojo/dojo/dojo.celery.beat.db' CELERY_BROKER_URL = 'sqla+sqlite:///dojo.celerydb.sqlite' CELERY_RESULT_BACKEND = 'db+sqlite:///dojo.celeryresults.sqlite' CELERY_RESULT_EXPIRES = 86400 CELERY_TASK_IGNORE_RESULT = True CELERY_TASK_SERIALIZER = 'pickle' CELERY_TIMEZONE = 'America/Chicago' CSRF_COOKIE_AGE = 31449600 CSRF_COOKIE_DOMAIN = None CSRF_COOKIE_HTTPONLY = True CSRF_COOKIE_NAME = u'csrftoken' CSRF_COOKIE_PATH = u'/' CSRF_COOKIE_SECURE = False CSRF_FAILURE_VIEW = u'django.views.csrf.csrf_failure' CSRF_HEADER_NAME = u'HTTP_X_CSRFTOKEN' CSRF_TRUSTED_ORIGINS = [] CSRF_USE_SESSIONS = False DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql', 'AUTOCOMMIT': True, 'ATOMIC_REQUESTS': False, 'NAME': 'dojodb', 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'PORT': '3306', 'HOST': 'localhost', 'USER': 'root', 'TEST': {'COLLATION': None, 'CHARSET': None, 'NAME': None, 'MIRROR': None}, 'PASSWORD': u'****', 'OPTIONS': {}}} DATABASE_ROUTERS = [] DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440 DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000 DATETIME_FORMAT = u'N j, Y, P' DATETIME_INPUT_FORMATS = [u'%Y-%m-%d %H:%M:%S', u'%Y-%m-%d %H:%M:%S.%f', u'%Y-%m-%d %H:%M', u'%Y-%m-%d', u'%m/%d/%Y %H:%M:%S', u'%m/%d/%Y %H:%M:%S.%f', u'%m/%d/%Y %H:%M', u'%m/%d/%Y', u'%m/%d/%y %H:%M:%S', u'%m/%d/%y %H:%M:%S.%f', u'%m/%d/%y %H:%M', u'%m/%d/%y'] DATE_FORMAT = u'N j, Y' DATE_INPUT_FORMATS = [u'%Y-%m-%d', u'%m/%d/%Y', u'%m/%d/%y', u'%b %d %Y', u'%b %d, %Y', u'%d %b %Y', u'%d %b, %Y', u'%B %d %Y', u'%B %d, %Y', u'%d %B %Y', u'%d %B, %Y'] DEBUG = True DEBUG_PROPAGATE_EXCEPTIONS = False DECIMAL_SEPARATOR = u'.' DEFAULT_CHARSET = u'utf-8' DEFAULT_CONTENT_TYPE = u'text/html' DEFAULT_EXCEPTION_REPORTER_FILTER = u'django.views.debug.SafeExceptionReporterFilter' DEFAULT_FILE_STORAGE = u'django.core.files.storage.FileSystemStorage' DEFAULT_FROM_EMAIL = u'webmaster@localhost' DEFAULT_INDEX_TABLESPACE = u'' DEFAULT_TABLESPACE = u'' DISALLOWED_USER_AGENTS = [] DOJO_ROOT = '/opt/django-DefectDojo/dojo' EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtpout.your_domain.com' EMAIL_HOST_PASSWORD = u'****' EMAIL_HOST_USER = u'' EMAIL_PORT = '25' EMAIL_SSL_CERTFILE = None EMAIL_SSL_KEYFILE = u'****' EMAIL_SUBJECT_PREFIX = u'[Django] ' EMAIL_TIMEOUT = None EMAIL_USE_LOCALTIME = False EMAIL_USE_SSL = False EMAIL_USE_TLS = True FILE_CHARSET = u'utf-8' FILE_UPLOAD_DIRECTORY_PERMISSIONS = None FILE_UPLOAD_HANDLERS = u"('django.core.files.uploadhandler.TemporaryFileUploadHandler',)" FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 FILE_UPLOAD_PERMISSIONS = None FILE_UPLOAD_TEMP_DIR = None FIRST_DAY_OF_WEEK = 0 FIXTURE_DIRS = [] FORCE_LOWERCASE_TAGS = True FORCE_SCRIPT_NAME = None FORMAT_MODULE_PATH = None FORM_RENDERER = u'django.forms.renderers.DjangoTemplates' IGNORABLE_404_URLS = [] IMAGEKIT_CACHEFILE_DIR = 'CACHE/images' IMAGEKIT_CACHEFILE_NAMER = 'imagekit.cachefiles.namers.hash' IMAGEKIT_CACHE_BACKEND = 'default' IMAGEKIT_CACHE_PREFIX = 'imagekit:' IMAGEKIT_CACHE_TIMEOUT = 300 IMAGEKIT_DEFAULT_CACHEFILE_BACKEND = 'imagekit.cachefiles.backends.Simple' IMAGEKIT_DEFAULT_CACHEFILE_STRATEGY = 'imagekit.cachefiles.strategies.JustInTime' IMAGEKIT_DEFAULT_FILE_STORAGE = u'django.core.files.storage.FileSystemStorage' IMAGEKIT_SPEC_CACHEFILE_NAMER = 'imagekit.cachefiles.namers.source_name_as_path' IMAGEKIT_USE_MEMCACHED_SAFE_CACHE_KEY = u'****' INSTALLED_APPS = u"('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'polymorphic', 'overextends', 'django.contrib.admin', 'django.contrib.humanize', 'gunicorn', 'tastypie', 'auditlog', 'dojo', 'tastypie_swagger', 'watson', 'tagging', 'custom_field', 'imagekit', 'multiselectfield', 'rest_framework', 'rest_framework.authtoken', 'rest_framework_swagger', 'dbbackup')" INTERNAL_IPS = [] LANGUAGES = [(u'af', u'Afrikaans'), (u'ar', u'Arabic'), (u'ast', u'Asturian'), (u'az', u'Azerbaijani'), (u'bg', u'Bulgarian'), (u'be', u'Belarusian'), (u'bn', u'Bengali'), (u'br', u'Breton'), (u'bs', u'Bosnian'), (u'ca', u'Catalan'), (u'cs', u'Czech'), (u'cy', u'Welsh'), (u'da', u'Danish'), (u'de', u'German'), (u'dsb', u'Lower Sorbian'), (u'el', u'Greek'), (u'en', u'English'), (u'en-au', u'Australian English'), (u'en-gb', u'British English'), (u'eo', u'Esperanto'), (u'es', u'Spanish'), (u'es-ar', u'Argentinian Spanish'), (u'es-co', u'Colombian Spanish'), (u'es-mx', u'Mexican Spanish'), (u'es-ni', u'Nicaraguan Spanish'), (u'es-ve', u'Venezuelan Spanish'), (u'et', u'Estonian'), (u'eu', u'Basque'), (u'fa', u'Persian'), (u'fi', u'Finnish'), (u'fr', u'French'), (u'fy', u'Frisian'), (u'ga', u'Irish'), (u'gd', u'Scottish Gaelic'), (u'gl', u'Galician'), (u'he', u'Hebrew'), (u'hi', u'Hindi'), (u'hr', u'Croatian'), (u'hsb', u'Upper Sorbian'), (u'hu', u'Hungarian'), (u'ia', u'Interlingua'), (u'id', u'Indonesian'), (u'io', u'Ido'), (u'is', u'Icelandic'), (u'it', u'Italian'), (u'ja', u'Japanese'), (u'ka', u'Georgian'), (u'kk', u'Kazakh'), (u'km', u'Khmer'), (u'kn', u'Kannada'), (u'ko', u'Korean'), (u'lb', u'Luxembourgish'), (u'lt', u'Lithuanian'), (u'lv', u'Latvian'), (u'mk', u'Macedonian'), (u'ml', u'Malayalam'), (u'mn', u'Mongolian'), (u'mr', u'Marathi'), (u'my', u'Burmese'), (u'nb', u'Norwegian Bokm\xe5l'), (u'ne', u'Nepali'), (u'nl', u'Dutch'), (u'nn', u'Norwegian Nynorsk'), (u'os', u'Ossetic'), (u'pa', u'Punjabi'), (u'pl', u'Polish'), (u'pt', u'Portuguese'), (u'pt-br', u'Brazilian Portuguese'), (u'ro', u'Romanian'), (u'ru', u'Russian'), (u'sk', u'Slovak'), (u'sl', u'Slovenian'), (u'sq', u'Albanian'), (u'sr', u'Serbian'), (u'sr-latn', u'Serbian Latin'), (u'sv', u'Swedish'), (u'sw', u'Swahili'), (u'ta', u'Tamil'), (u'te', u'Telugu'), (u'th', u'Thai'), (u'tr', u'Turkish'), (u'tt', u'Tatar'), (u'udm', u'Udmurt'), (u'uk', u'Ukrainian'), (u'ur', u'Urdu'), (u'vi', u'Vietnamese'), (u'zh-hans', u'Simplified Chinese'), (u'zh-hant', u'Traditional Chinese')] LANGUAGES_BIDI = [u'he', u'ar', u'fa', u'ur'] LANGUAGE_CODE = 'en-us' LANGUAGE_COOKIE_AGE = None LANGUAGE_COOKIE_DOMAIN = None LANGUAGE_COOKIE_NAME = u'django_language' LANGUAGE_COOKIE_PATH = u'/' LOCALE_PATHS = [] LOGGING = {'loggers': {'dojo': {'handlers': ['file_handler', 'file_handler_debug'], 'propagate': False, 'level': 'DEBUG'}, 'django.request': {'handlers': ['mail_admins'], 'propagate': True, 'level': 'ERROR'}}, 'disable_existing_loggers': False, 'handlers': {'file_handler_debug': {'level': 'DEBUG', 'class': 'logging.FileHandler', 'filters': ['require_debug_true'], 'filename': '/opt/django-DefectDojo/dojo/../django_app.log'}, 'file_handler': {'level': 'INFO', 'class': 'logging.FileHandler', 'filters': ['require_debug_false'], 'filename': '/opt/django-DefectDojo/dojo/../django_app.log'}, 'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}, 'formatters': {'simple': {'format': '%(levelname)s %(funcName)s %(lineno)d %(message)s'}, 'verbose': {'datefmt': '%d/%b/%Y %H:%M:%S', 'format': '[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s'}}, 'version': 1, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}, 'require_debug_true': {'()': 'django.utils.log.RequireDebugTrue'}}} LOGGING_CONFIG = u'logging.config.dictConfig' LOGIN_EXEMPT_URLS = u"('^static/', '^webhook/', '^metrics/all$', '^metrics$', '^metrics/product/type/(?P\\d+)$', '^metrics/simple$', '^api/v1/', '^ajax/v1/', '^reports/cover$', '^finding/image/(?P[^/]+)$', '^api/v2/')" LOGIN_REDIRECT_URL = '/' LOGIN_URL = '/login' LOGOUT_REDIRECT_URL = None MANAGERS = u"('Your Name', 'your.name@yourdomain')" MAX_TAG_LENGTH = 25 MEDIA_ROOT = '/opt/django-DefectDojo/media/' MEDIA_URL = '/media/' MESSAGE_STORAGE = u'django.contrib.messages.storage.fallback.FallbackStorage' MIDDLEWARE = None MIDDLEWARE_CLASSES = u"('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'dojo.middleware.LoginRequiredMiddleware', 'dojo.middleware.TimezoneMiddleware')" MIGRATION_MODULES = {} MONTH_DAY_FORMAT = u'F j' NUMBER_GROUPING = 0 PASSWORD_HASHERS = u'****' PASSWORD_RESET_TIMEOUT_DAYS = u'****' PORT_SCAN_CONTACT_EMAIL = 'email@your_host' PORT_SCAN_EXTERNAL_UNIT_EMAIL_LIST = ['email@your_host'] PORT_SCAN_RESULT_EMAIL_FROM = 'email@your_host' PORT_SCAN_SOURCE_IP = '127.0.0.1' PREPEND_WWW = False REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.BasicAuthentication'), 'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer',), 'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.DjangoModelPermissions',), 'PAGE_SIZE': 25, 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination'} ROOT_URLCONF = 'dojo.urls' SECRET_KEY = u'****' SECURE_BROWSER_XSS_FILTER = False SECURE_CONTENT_TYPE_NOSNIFF = False SECURE_HSTS_INCLUDE_SUBDOMAINS = False SECURE_HSTS_PRELOAD = False SECURE_HSTS_SECONDS = 0 SECURE_PROXY_SSL_HEADER = None SECURE_REDIRECT_EXEMPT = [] SECURE_SSL_HOST = None SECURE_SSL_REDIRECT = False SERVER_EMAIL = u'root@localhost' SESSION_CACHE_ALIAS = u'default' SESSION_COOKIE_AGE = 1209600 SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_HTTPONLY = True SESSION_COOKIE_NAME = u'sessionid' SESSION_COOKIE_PATH = u'/' SESSION_COOKIE_SECURE = False SESSION_ENGINE = u'django.contrib.sessions.backends.db' SESSION_EXPIRE_AT_BROWSER_CLOSE = False SESSION_FILE_PATH = None SESSION_SAVE_EVERY_REQUEST = False SESSION_SERIALIZER = u'django.contrib.sessions.serializers.JSONSerializer' SETTINGS_MODULE = 'dojo.settings.settings' SHORT_DATETIME_FORMAT = u'm/d/Y P' SHORT_DATE_FORMAT = u'm/d/Y' SIGNING_BACKEND = u'django.core.signing.TimestampSigner' SILENCED_SYSTEM_CHECKS = [] SITE_ID = 1 STATICFILES_DIRS = u"('/opt/django-DefectDojo/components/node_modules/@yarn_components',)" STATICFILES_FINDERS = u"('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder')" STATICFILES_STORAGE = u'django.contrib.staticfiles.storage.StaticFilesStorage' STATIC_ROOT = '/opt/django-DefectDojo/static/' STATIC_URL = '/static/' SWAGGER_SETTINGS = {'SECURITY_DEFINITIONS': {'api_key': u'****'}} TEAM_NAME = 'Security Engineering' TEMPLATES = [{'APP_DIRS': True, 'OPTIONS': {'debug': True, 'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}, 'BACKEND': 'django.template.backends.django.DjangoTemplates'}] TEST_NON_SERIALIZED_APPS = [] TEST_RUNNER = 'django.test.runner.DiscoverRunner' THOUSAND_SEPARATOR = u',' TIME_FORMAT = u'P' TIME_INPUT_FORMATS = [u'%H:%M:%S', u'%H:%M:%S.%f', u'%H:%M'] TIME_ZONE = 'America/Chicago' URL_PREFIX = '' USE_ETAGS = False USE_I18N = True USE_L10N = True USE_THOUSAND_SEPARATOR = False USE_TZ = True USE_X_FORWARDED_HOST = False USE_X_FORWARDED_PORT = False WKHTMLTOPDF_PATH = '/usr/local/bin/wkhtmltopdf' WSGI_APPLICATION = 'dojo.wsgi.application' X_FRAME_OPTIONS = u'SAMEORIGIN' YEAR_MONTH_FORMAT = u'F Y'

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

Sample Scan File (if applicable)

Screenshots (optional)

Console Logs (optional)

Nilix007 commented 6 years ago

Will be fixed with v1.5.3 which gets rid of the HyperlinkedSerializers :smile:

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.