Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
25cf39da
Commit
25cf39da
authored
6 years ago
by
asadazam93
Browse files
Options
Downloads
Patches
Plain Diff
Clean XSS in lms template
parent
c515b357
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AUTHORS
+1
-0
1 addition, 0 deletions
AUTHORS
openedx/core/djangoapps/debug/views.py
+2
-1
2 additions, 1 deletion
openedx/core/djangoapps/debug/views.py
with
3 additions
and
1 deletion
AUTHORS
+
1
−
0
View file @
25cf39da
...
...
@@ -290,3 +290,4 @@ Matt Tuchfarber <mtuchfarber@edx.org>
Stuart Young <syoung@edx.org>
Michael Youngstrom <myoungstrom@edx.org>
Sahar Markovich <sahar.markovich@gmail.com>
Asad Azam <asadazam93@gmail.com>
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/debug/views.py
+
2
−
1
View file @
25cf39da
...
...
@@ -3,6 +3,7 @@ Views that are only activated when the project is running in development mode.
These views will NOT be shown on production: trying to access them will result
in a 404 error.
"""
import
bleach
from
django.http
import
HttpResponseNotFound
from
django.template
import
TemplateDoesNotExist
from
django.utils.translation
import
ugettext
as
_
...
...
@@ -52,4 +53,4 @@ def show_reference_template(request, template):
return
render_to_response
(
template
,
context
)
except
TemplateDoesNotExist
:
return
HttpResponseNotFound
(
'
Missing template {template}
'
.
format
(
template
=
template
))
return
HttpResponseNotFound
(
'
Missing template {template}
'
.
format
(
template
=
bleach
.
clean
(
template
,
strip
=
True
)
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment