Pervent reverse tabnabbing in edx platform

This commit is contained in:
Awais Jibran
2019-08-22 16:37:44 +05:00
parent 1c4f9da92d
commit 1a4eb7d2e8
61 changed files with 120 additions and 103 deletions

View File

@@ -294,7 +294,7 @@ from student.models import CourseEnrollment
<li class="order-history">
<span class="title">${_("Order History")}</span>
% for order_history_item in order_history_list:
<span><a href="${order_history_item['receipt_url']}" target="_blank" class="edit-name">${order_history_item['order_date']}</a></span>
<span><a href="${order_history_item['receipt_url']}" rel="noopener" target="_blank" class="edit-name">${order_history_item['order_date']}</a></span>
% endfor
</li>
% endif

View File

@@ -67,13 +67,11 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
% endif
<div class="mobile-nav-item hidden-mobile nav-item">
% if online_help_token == "instructor":
<a class="help-link" href="${get_online_help_info(online_help_token)['doc_url']}" target="_blank">${_("Help")}</a>
<a class="help-link" href="${get_online_help_info(online_help_token)['doc_url']}" rel="noopener" target="_blank">${_("Help")}</a>
% else:
<a class="help-link" href="${configuration_helpers.get_value('SUPPORT_SITE_LINK', settings.SUPPORT_SITE_LINK)}" target="_blank">${_("Help")}</a>
<a class="help-link" href="${configuration_helpers.get_value('SUPPORT_SITE_LINK', settings.SUPPORT_SITE_LINK)}" rel="noopener" target="_blank">${_("Help")}</a>
% endif
</div>
<%include file="user_dropdown.html"/>
</div>
</div>

View File

@@ -21,7 +21,7 @@ from openedx.core.djangolib.markup import HTML, Text
// new window/tab opening
$('a[rel="external"], a[class="new-vp"]')
.click( function() {
window.open( $(this).attr('href') );
window.open( $(this).attr('href'), '', 'noopener' );
return false;
});