Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added patch for security vulnerability in adding online publications #587

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ coldfront.db
db.json
.env
.devcontainer/*
.bin/*
.bin/*
3 changes: 2 additions & 1 deletion coldfront/core/publication/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ast
import json
import re
import uuid
import requests
Expand Down Expand Up @@ -204,7 +205,7 @@ def dispatch(self, request, *args, **kwargs):
return super().dispatch(request, *args, **kwargs)

def post(self, request, *args, **kwargs):
pubs = ast.literal_eval(request.POST.get('pubs'))
pubs = [json.loads(request.POST.get('pubs').replace("[", "").replace("]", "").replace("'", "\""))]
project_pk = self.kwargs.get('project_pk')

project_obj = get_object_or_404(Project, pk=project_pk)
Expand Down