Skip to content

Commit

Permalink
Merge branch 'main' into issueNo-OWASP-BLT#1351
Browse files Browse the repository at this point in the history
  • Loading branch information
DonnieBLT authored Nov 4, 2023
2 parents 55a7e02 + 2b9cb44 commit a9d8139
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion website/static/vendor/bootstrap/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,7 @@ function sanitizeInput(input) {
.addClass(placement)
.data('bs.' + this.type, this)

this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
this.options.container ? $tip.appendTo(sanitizeSelector(this.options.container)) : $tip.insertAfter(this.$element)
this.$element.trigger('inserted.bs.' + this.type)

var pos = this.getPosition()
Expand Down
10 changes: 5 additions & 5 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,10 @@ def get_score(request):


def comment_on_issue(request, issue_pk):

try:
issue_pk = int(issue_pk)
except ValueError:
raise Http404("Issue does not exist")
issue = Issue.objects.filter(pk=issue_pk).first()

if request.method == "POST" and isinstance(request.user,User):
Expand All @@ -2008,10 +2011,7 @@ def comment_on_issue(request, issue_pk):

if parent_comment == None:
messages.error(request,"Parent comment doesn't exist.")
if isinstance(issue_pk, int): # Check if issue_pk is an integer
return redirect(f"/issue2/{issue_pk}")
else:
raise Http404("Issue does not exist")
return redirect(f"/issue2/{issue_pk}")

Comment.objects.create(
parent = parent_comment,
Expand Down

0 comments on commit a9d8139

Please sign in to comment.