From d8e9ffbb0b736c8b782d3fe72e2104fd2d37f8be Mon Sep 17 00:00:00 2001 From: Usman Khalid Date: Thu, 19 Sep 2013 12:38:32 +0000 Subject: [PATCH] Added missing test in StaticImageBookTest --- lms/djangoapps/staticbook/tests.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lms/djangoapps/staticbook/tests.py b/lms/djangoapps/staticbook/tests.py index 135150a2d1..143f5a46ab 100644 --- a/lms/djangoapps/staticbook/tests.py +++ b/lms/djangoapps/staticbook/tests.py @@ -105,6 +105,13 @@ class StaticImageBookTest(StaticBookTest): response = self.client.get(url) self.assertEqual(response.status_code, 404) + def test_page_xss(self): + # The page in the URL used to go right on the page. + self.make_course(textbooks=[IMAGE_BOOK]) + # It's no longer possible to use a non-integer page. + with self.assertRaises(NoReverseMatch): + self.make_url('book', book_index=0, page='xyzzy') + class StaticPdfBookTest(StaticBookTest): """