diff --git a/test/server.cpp b/test/server.cpp index 3950f73c7..600b171ae 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -512,6 +512,30 @@ TEST_F(ServerTest, 404WithBodyTesting)

)" }, + { /* url */ R"(/ROOT/">)", + /* expected body */ R"( +

Not Found

+

+ The requested URL "/ROOT/"><svg onload=alert(1)>" was not found on this server. +

+

+ Make a full text search for "><svg onload=alert(1)> +

+)" }, + + { /* url */ R"(/ROOT/zimfile/">)", + /* book name */ "zimfile", + /* book title */ "Ray Charles", + /* expected body */ R"( +

Not Found

+

+ The requested URL "/ROOT/zimfile/"><svg onload=alert(1)>" was not found on this server. +

+

+ Make a full text search for "><svg onload=alert(1)> +

+)" }, + { /* url */ "/ROOT/raw/no-such-book/meta/Title", /* expected body */ R"(

Not Found