Exploit databaseDownload repository ZIP
GH-bc303729e8eac9d0545e8253ab721603
abeltrar/app_security
Sources for CVE-1999-0211
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files15
abeltrar/app_securityRevision 29cf1dcbe92b
- ↑..Parent directory
- __pycache__/
- inspectors/
- management/
- static/
- templates/
- __init__.py
- app_settings.py
- codecs.py
- errors.py
- generators.py
- middleware.py
- openapi.py
- renderers.py
- utils.py
- views.py
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
venv/Lib/site-packages/drf_yasg/middleware.py
Python · 799 bytesfrom django.http import HttpResponse
from .codecs import _OpenAPICodec
from .errors import SwaggerValidationError
class SwaggerExceptionMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
return self.get_response(request)
def process_exception(self, request, exception):
if isinstance(exception, SwaggerValidationError):
err = {'errors': exception.errors, 'message': str(exception)}
codec = exception.source_codec
if isinstance(codec, _OpenAPICodec):
err = codec.encode_error(err)
content_type = codec.media_type
return HttpResponse(err, status=500, content_type=content_type)
return None # pragma: no cover