Fix lms templates to prevent xss attacks.

This patch is part of multiple PR's.

LEARNER-4632
This commit is contained in:
Adeel Khan
2019-07-01 14:41:06 +05:00
parent b4649edf12
commit ef0d56aac6
7 changed files with 64 additions and 42 deletions

View File

@@ -150,7 +150,7 @@ class LoginFormTest(ThirdPartyAuthTestMixin, UrlResetMixin, SharedModuleStoreTes
# Verify that the parameters are sent on to the next page correctly
post_login_handler = _finish_auth_url(params)
js_success_var = u'var nextUrl = "{}";'.format(post_login_handler)
js_success_var = u'var nextUrl = "{}";'.format(js_escaped_string(post_login_handler))
self.assertContains(response, js_success_var)
# Verify that the login link preserves the querystring params