22 lines
378 B
Python
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()
|