From 8e9211d2dd816c56d85a4c9b85c1afab2025f746 Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Fri, 24 Aug 2012 14:04:17 -0400 Subject: [PATCH 1/5] Re-enabling link to wiki 'see all children'. The bug for which this was disabled is already fixed. --- lms/templates/wiki/article.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/lms/templates/wiki/article.html b/lms/templates/wiki/article.html index 0e2a997290..5b12942af5 100644 --- a/lms/templates/wiki/article.html +++ b/lms/templates/wiki/article.html @@ -33,11 +33,9 @@ {% if urlpath %} - {% endif %} From 2bc9d08b25181bb31c629809b483a4878c7b213a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s=20Rocha?= Date: Fri, 24 Aug 2012 14:11:35 -0400 Subject: [PATCH 2/5] Fixed WikiPath regexp. It was incorrectly matching [Title](Link) on the same line. --- repo-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo-requirements.txt b/repo-requirements.txt index fc6ae1b301..7119106d8b 100644 --- a/repo-requirements.txt +++ b/repo-requirements.txt @@ -1,6 +1,6 @@ -e git://github.com/MITx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles -e git://github.com/MITx/django-pipeline.git#egg=django-pipeline --e git://github.com/benjaoming/django-wiki.git@7e42bce#egg=django-wiki +-e git://github.com/benjaoming/django-wiki.git@cd1c23e1#egg=django-wiki -e git://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev -e common/lib/capa -e common/lib/xmodule From f7e299d04ea190d86f6fcefc0ffdf064ad11d39e Mon Sep 17 00:00:00 2001 From: Arjun Singh Date: Fri, 24 Aug 2012 11:15:06 -0700 Subject: [PATCH 3/5] fix inline discussion --- lms/static/coffee/src/discussion/discussion_module.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/static/coffee/src/discussion/discussion_module.coffee b/lms/static/coffee/src/discussion/discussion_module.coffee index 4bcacc1474..8306d4d2ae 100644 --- a/lms/static/coffee/src/discussion/discussion_module.coffee +++ b/lms/static/coffee/src/discussion/discussion_module.coffee @@ -27,7 +27,7 @@ if Backbone? $discussion = @$el.find("section.discussion") $(event.target).html("Hide Discussion") discussion = new Discussion() - discussion.reset(response.discussionData, {silent: false}) + discussion.reset(response.discussion_data, {silent: false}) view = new DiscussionView(el: $discussion[0], model: discussion) DiscussionUtil.bulkUpdateContentInfo(window.$$annotated_content_info) @retrieved = true From 268a87442e85ff6553486c2c6a7dd679c4460ed2 Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Fri, 24 Aug 2012 14:18:49 -0400 Subject: [PATCH 4/5] Added SECURE_PROXY_SSL_HEADER to env/aws. --- lms/envs/aws.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 75ae712b88..a035d291e8 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -23,6 +23,12 @@ DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' MITX_FEATURES['ENABLE_DISCUSSION'] = False MITX_FEATURES['ENABLE_DISCUSSION_SERVICE'] = True +# IMPORTANT: With this enabled, the server must always be behind a proxy that +# strips the header HTTP_X_FORWARDED_PROTO from client requests. Otherwise, +# a user can fool our server into thinking it was an https connection. +# See https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header +# for other warnings. +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') ########################### NON-SECURE ENV CONFIG ############################## # Things like server locations, ports, etc. From 4c21abc433433e7dce3392cd988f8cfbb470c194 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Fri, 24 Aug 2012 15:05:18 -0400 Subject: [PATCH 5/5] empty default for comments_service_key and comments_url because it was breaking configs that do not have it in env.json --- lms/envs/aws.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index a035d291e8..fbcb9b8e4c 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -32,6 +32,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') ########################### NON-SECURE ENV CONFIG ############################## # Things like server locations, ports, etc. + with open(ENV_ROOT / "env.json") as env_file: ENV_TOKENS = json.load(env_file) @@ -55,6 +56,8 @@ LOGGING = get_logger_config(LOG_DIR, COURSE_LISTINGS = ENV_TOKENS.get('COURSE_LISTINGS', {}) SUBDOMAIN_BRANDING = ENV_TOKENS.get('SUBDOMAIN_BRANDING', {}) +COMMENTS_SERVICE_URL = ENV_TOKENS.get("COMMENTS_SERVICE_URL",'') +COMMENTS_SERVICE_KEY = ENV_TOKENS.get("COMMENTS_SERVICE_KEY",'') ############################## SECURE AUTH ITEMS ############################### # Secret things: passwords, access keys, etc. @@ -73,5 +76,3 @@ XQUEUE_INTERFACE = AUTH_TOKENS['XQUEUE_INTERFACE'] if 'COURSE_ID' in ENV_TOKENS: ASKBOT_URL = "courses/{0}/discussions/".format(ENV_TOKENS['COURSE_ID']) -COMMENTS_SERVICE_URL = ENV_TOKENS["COMMENTS_SERVICE_URL"] -COMMENTS_SERVICE_KEY = ENV_TOKENS["COMMENTS_SERVICE_KEY"]