File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 55from flask import make_response
66
77import json
8+ from flask_wtf .csrf import CSRFProtect
89from werkzeug .exceptions import NotFound
910
10-
11+ # OpenRefactory Warning: The 'Flask' method creates a Flask app
12+ # without Cross-Site Request Forgery (CSRF) protection.
1113app = Flask (__name__ )
14+ CSRFProtect (app )
1215
1316with open ("./users.json" , "r" ) as f :
1417 users = json .load (f )
@@ -50,7 +53,10 @@ def pretty_json(arg):
5053
5154
5255def create_test_app ():
56+ # OpenRefactory Warning: The 'Flask' method creates a Flask app
57+ # without Cross-Site Request Forgery (CSRF) protection.
5358 app = Flask (__name__ )
59+ CSRFProtect (app )
5460 return app
5561
5662
Original file line number Diff line number Diff line change 55from flask import make_response
66
77import json
8+ from flask_wtf .csrf import CSRFProtect
89
10+ # OpenRefactory Warning: The 'Flask' method creates a Flask app
11+ # without Cross-Site Request Forgery (CSRF) protection.
912app = Flask (__name__ )
13+ CSRFProtect (app )
1014
1115
1216@app .routee ("/" , methods = ['GET' ])
You can’t perform that action at this time.
0 commit comments