Skip to content

Commit

Permalink
Fix DeepSource failed checks
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenDsouza90 committed Jun 14, 2020
1 parent bd0d4cc commit a1fd590
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion webapp/graphite/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ def save(request, name):
state = str(json.dumps(state))

name = sanitize(name)

try:
dashboard = Dashboard.objects.get(name=name)
except Dashboard.DoesNotExist:
Expand Down
10 changes: 4 additions & 6 deletions webapp/graphite/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,7 @@ def parseHosts(host_strings):
return [parseHost(host_string) for host_string in host_strings]


def sanitize(string):
"""
Sanitize input string to prevent XSS vulnerability attack.
"""

return strip_tags(string)
def sanitize(input_string):
"""Sanitize input string to prevent XSS vulnerability attack."""

return strip_tags(input_string)

0 comments on commit a1fd590

Please sign in to comment.