From a1ffcc52594b1e7240501aab0ea145f1da3edb5a Mon Sep 17 00:00:00 2001 From: Syed Hassan Raza Date: Tue, 13 Jan 2015 17:30:17 +0500 Subject: [PATCH 1/3] Disable referrer (TNL-1144) --- common/static/js/vendor/noreferrer.js | 10 ++++++++++ lms/templates/footer-edx-new.html | 14 ++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 common/static/js/vendor/noreferrer.js diff --git a/common/static/js/vendor/noreferrer.js b/common/static/js/vendor/noreferrer.js new file mode 100644 index 0000000000..d853a0bfb4 --- /dev/null +++ b/common/static/js/vendor/noreferrer.js @@ -0,0 +1,10 @@ +/* + jquery.noreferrer.js, version 0.1.3 + https://github.com/knu/noreferrer + + Copyright (c) 2011 Akinori MUSHA + Licensed under the 2-clause BSD license. +*/ +(function(){(function(){$.browser.webkit||$.event.add(window,"load",function(){$("a[href][rel~=noreferrer], area[href][rel~=noreferrer]").each(function(){var b,e,c,g,d,f,h;b=this;c=b.href;$.browser.opera?(b.href="http://www.google.com/url?q="+encodeURIComponent(c),b.title||(b.title="Go to "+c)):(d=!1,g=function(){b.href="javascript:void(0)"},f=function(){b.href=c},$(b).bind("mouseout mouseover focus blur",f).mousedown(function(a){a.which===2&&(d=!0)}).blur(function(){d=!1}).mouseup(function(a){if(!(a.which=== +2&&d))return!0;g();d=!1;setTimeout(function(){alert("Middle clicking on this link is disabled");f()},500);return!1}),e="",$.browser.msie?$(b).click(function(){var a;switch(a=this.target||"_self"){case "_self":case window.name:a=window;break;default:a=window.open(null,a)}a=a.document;a.clear();a.write(e);a.close();return!1}):(h="data:text/html;charset=utf-8,"+ +encodeURIComponent(e),$(b).click(function(){this.href=h;return!0})))})})})()}).call(this); \ No newline at end of file diff --git a/lms/templates/footer-edx-new.html b/lms/templates/footer-edx-new.html index 9f207bc276..b0a9d6f091 100644 --- a/lms/templates/footer-edx-new.html +++ b/lms/templates/footer-edx-new.html @@ -2,7 +2,6 @@ <%! from django.core.urlresolvers import reverse %> <%! from django.utils.translation import ugettext as _ %> <%namespace name='static' file='static_content.html'/> - ## WARNING: These files are specific to edx.org and are not used in installations outside of that domain. Open edX users will want to use the file "footer.html" for any changes or overrides. + + + From c71a1833161d3e2c456b00f841d7b72e7d8998d4 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 29 Jan 2015 11:41:18 -0500 Subject: [PATCH 2/3] Update embargo copy. ECOM-963 update copy in tests --- common/djangoapps/embargo/tests/test_middleware.py | 2 +- lms/templates/static_templates/embargo.html | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/common/djangoapps/embargo/tests/test_middleware.py b/common/djangoapps/embargo/tests/test_middleware.py index a02f4d31b8..10d03f0360 100644 --- a/common/djangoapps/embargo/tests/test_middleware.py +++ b/common/djangoapps/embargo/tests/test_middleware.py @@ -54,7 +54,7 @@ class EmbargoMiddlewareTests(ModuleStoreTestCase): CourseEnrollment.enroll(self.user, self.regular_course.id) CourseEnrollment.enroll(self.user, self.embargo_course.id) # Text from lms/templates/static_templates/embargo.html - self.embargo_text = "Unfortunately, at this time edX must comply with export controls, and we cannot allow you to access this particular course." + self.embargo_text = "Unfortunately, at this time edX must comply with export controls, and we cannot allow you to access this course." self.patcher = mock.patch.object(pygeoip.GeoIP, 'country_code_by_addr', self.mock_country_code_by_addr) self.patcher.start() diff --git a/lms/templates/static_templates/embargo.html b/lms/templates/static_templates/embargo.html index 016864b7cf..f10ba08e6c 100644 --- a/lms/templates/static_templates/embargo.html +++ b/lms/templates/static_templates/embargo.html @@ -6,11 +6,9 @@

${_("Our system indicates that you are trying to access this {platform_name} " - "course from a country currently subject to U.S. economic and trade " + "course from a country or region currently subject to U.S. economic and trade " "sanctions. Unfortunately, at this time {platform_name} must comply with " - "export controls, and we cannot allow you to access this particular course. " - "Feel free to browse our catalogue to find other courses you may be " - "interested in taking." + "export controls, and we cannot allow you to access this course." ).format( platform_name=settings.PLATFORM_NAME, )} From d4d785bfd794986867eab2bac150530803632b30 Mon Sep 17 00:00:00 2001 From: Adam Palay Date: Thu, 29 Jan 2015 14:18:38 -0500 Subject: [PATCH 3/3] update codejail (TNL-1248) (optionally use a proxy process to spawn subprocesses) --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index daadae99dc..9029c0f6a1 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -22,7 +22,7 @@ git+https://github.com/mitocw/django-cas.git@60a5b8e5a62e63e0d5d224a87f0b489201a # Our libraries: -e git+https://github.com/edx/XBlock.git@9c634481dfc85a17dcb3351ca232d7098a38e10e#egg=XBlock --e git+https://github.com/edx/codejail.git@2b095e820ff752a108653bb39d518b122f7154db#egg=codejail +-e git+https://github.com/edx/codejail.git@6b17c33a89bef0ac510926b1d7fea2748b73aadd#egg=codejail -e git+https://github.com/edx/js-test-tool.git@v0.1.6#egg=js_test_tool -e git+https://github.com/edx/event-tracking.git@0.1.0#egg=event-tracking -e git+https://github.com/edx/bok-choy.git@9fd05383dc434e0275c9874fd50ad14e519448bc#egg=bok_choy