Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MBetterd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mbetter
MBetterd
Commits
b19fc3ac
Commit
b19fc3ac
authored
Sep 26, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CSRF by importing global csrf object from app instead of local CSRFProtect
parent
1ed1589c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
routes.py
app/upload/routes.py
+1
-3
No files found.
app/upload/routes.py
View file @
b19fc3ac
...
...
@@ -5,10 +5,9 @@ import shutil
from
flask
import
request
,
jsonify
,
render_template
,
redirect
,
url_for
,
flash
,
current_app
from
flask_login
import
login_required
,
current_user
from
flask_jwt_extended
import
jwt_required
,
get_jwt_identity
from
flask_wtf
import
CSRFProtect
from
werkzeug.utils
import
secure_filename
from
app.upload
import
bp
from
app
import
db
from
app
import
db
,
csrf
from
app.upload.file_handler
import
get_file_upload_handler
from
app.upload.fixture_parser
import
get_fixture_parser
from
app.utils.security
import
require_active_user
,
validate_file_type
,
hash_file_content
...
...
@@ -16,7 +15,6 @@ from app.utils.logging import log_file_operation, log_upload_progress
from
app.upload.forms
import
FixtureUploadForm
,
ZipUploadForm
logger
=
logging
.
getLogger
(
__name__
)
csrf
=
CSRFProtect
()
@
bp
.
route
(
'/fixture'
,
methods
=
[
'GET'
,
'POST'
])
@
login_required
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment