Skip to content

Commit

Permalink
#1340: Added csrf except decorator to non-api method
Browse files Browse the repository at this point in the history
return file system errors to user.
  • Loading branch information
susanodd committed Oct 11, 2024
1 parent c180b4f commit 4a89825
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion signbank/manage_videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def import_video_to_gloss_manager(request, video_file_path):
import_video_data["videofile"] = filename
import_video_data["imagelink"] = ""
import_video_data["videolink"] = ""
import_video_data["uploadstatus"] = _("Failure.")
import_video_data["uploadstatus"] = status
import_video_data["errors"] = errors
return import_video_data

Expand Down
3 changes: 3 additions & 0 deletions signbank/zip_interface.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import json

from django.views.decorators.csrf import csrf_exempt

from signbank.dictionary.models import *
from django.db.models import FileField
from django.core.files.base import ContentFile, File
Expand Down Expand Up @@ -247,6 +249,7 @@ def save_video(video_file_path, goal):
return False, feedback_message


@csrf_exempt
def import_video_file(request, gloss, video_file_path):
# request is needed as a parameter to the GlossVideoHistory
try:
Expand Down

0 comments on commit 4a89825

Please sign in to comment.