mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Add left tests
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from flask import Flask, request
|
||||
from pymongo import MongoClient
|
||||
import json
|
||||
|
||||
app = Flask(__name__)
|
||||
client = MongoClient()
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def home_page():
|
||||
unsanitized_search = json.loads(request.args['search'])
|
||||
|
||||
db_results = client.db.collection.find_one({'data': unsanitized_search})
|
||||
return db_results[0].keys()
|
||||
|
||||
# if __name__ == "__main__":
|
||||
# app.run(debug=True)
|
||||
@@ -0,0 +1,19 @@
|
||||
from flask import Flask, request
|
||||
from pymongo import MongoClient
|
||||
from mongosanitizer.sanitizer import sanitize
|
||||
import json
|
||||
|
||||
app = Flask(__name__)
|
||||
client = MongoClient()
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def home_page():
|
||||
unsanitized_search = json.loads(request.args['search'])
|
||||
sanitize(unsanitized_search)
|
||||
|
||||
db_results = client.db.collection.find_one({'data': unsanitized_search})
|
||||
return db_results[0].keys()
|
||||
|
||||
# if __name__ == "__main__":
|
||||
# app.run(debug=True)
|
||||
Reference in New Issue
Block a user