research-school-2024/examples/debug.py
Ari Archer 2dd94a9bc5
Implement a bunch of vulnerabile examples.
Signed-off-by: Ari Archer <ari@ari.lt>
2024-12-05 01:30:06 +02:00

22 lines
378 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Bad security configuration"""
from flask import Flask
app: Flask = Flask(__name__)
app.config["DEBUG"] = True # Misconfiguration: Debug mode enabled in production
@app.route("/")
def index():
return "Hello World!"
@app.route("/crash")
def crash():
raise Exception("42")
if __name__ == "__main__":
app.run()