From 7eb9a45e2db1b4ef6199d4364528f128cdbfc136 Mon Sep 17 00:00:00 2001 From: Waheed Ahmed Date: Tue, 31 May 2022 16:07:05 +0500 Subject: [PATCH] fix: cross-site scripting vulnerability on logout page The target URL on logout page is marked as safe while rendering and making the page volunerable to Cross-site scripting vulnerability. Rendered the target variable outside safe HTML so that it should be treated as text. VAN-972 --- lms/templates/logout.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lms/templates/logout.html b/lms/templates/logout.html index 48a9428c84..272d933542 100644 --- a/lms/templates/logout.html +++ b/lms/templates/logout.html @@ -10,9 +10,9 @@

{% blocktrans trimmed asvar sso_signout_msg %} - {start_anchor}Click here{end_anchor} to delete your single signed on (SSO) session. + {start_anchor}{{ tpa_logout_url }}{middle_anchor}Click here{end_anchor} to delete your single signed on (SSO) session. {% endblocktrans %} - {% interpolate_html sso_signout_msg start_anchor=''|safe end_anchor=''|safe %} + {% interpolate_html sso_signout_msg start_anchor=''|safe end_anchor=''|safe %}

{% else %} @@ -36,9 +36,9 @@

{% blocktrans trimmed asvar signout_msg1 %} - If you are not redirected within 5 seconds, {start_anchor}click here to go to the home page{end_anchor}. + If you are not redirected within 5 seconds, {start_anchor}{{ target }}{middle_anchor}click here to go to the home page{end_anchor}. {% endblocktrans %} - {% interpolate_html signout_msg1 start_anchor=''|safe end_anchor=''|safe %} + {% interpolate_html signout_msg1 start_anchor=''|safe end_anchor=''|safe %}

{% endif %}