mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
16 lines
377 B
Python
16 lines
377 B
Python
from flask import Flask, request, make_response, escape
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
@app.route("/unsafe")
|
|
def unsafe():
|
|
first_name = request.args.get("name", "")
|
|
return make_response("Your name is " + first_name) # NOT OK
|
|
|
|
|
|
@app.route("/safe")
|
|
def safe():
|
|
first_name = request.args.get("name", "")
|
|
return make_response("Your name is " + escape(first_name)) # OK
|