Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
11c0094f
Commit
11c0094f
authored
Mar 05, 2016
by
M. Rehan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11679 from edx/code-jail-configs-cms-demo
TNL-4140 – Configure code jail for Studio
parents
56ecc664
55ab52ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
cms/envs/aws.py
+8
-0
cms/envs/common.py
+17
-0
No files found.
cms/envs/aws.py
View file @
11c0094f
...
...
@@ -176,6 +176,14 @@ SERVER_EMAIL = ENV_TOKENS.get('SERVER_EMAIL', SERVER_EMAIL)
MKTG_URLS
=
ENV_TOKENS
.
get
(
'MKTG_URLS'
,
MKTG_URLS
)
TECH_SUPPORT_EMAIL
=
ENV_TOKENS
.
get
(
'TECH_SUPPORT_EMAIL'
,
TECH_SUPPORT_EMAIL
)
for
name
,
value
in
ENV_TOKENS
.
get
(
"CODE_JAIL"
,
{})
.
items
():
oldvalue
=
CODE_JAIL
.
get
(
name
)
if
isinstance
(
oldvalue
,
dict
):
for
subname
,
subvalue
in
value
.
items
():
oldvalue
[
subname
]
=
subvalue
else
:
CODE_JAIL
[
name
]
=
value
COURSES_WITH_UNSAFE_CODE
=
ENV_TOKENS
.
get
(
"COURSES_WITH_UNSAFE_CODE"
,
[])
ASSET_IGNORE_REGEX
=
ENV_TOKENS
.
get
(
'ASSET_IGNORE_REGEX'
,
ASSET_IGNORE_REGEX
)
...
...
cms/envs/common.py
View file @
11c0094f
...
...
@@ -342,6 +342,8 @@ MIDDLEWARE_CLASSES = (
# Detects user-requested locale from 'accept-language' header in http request
'django.middleware.locale.LocaleMiddleware'
,
'codejail.django_integration.ConfigureCodeJailMiddleware'
,
# needs to run after locale middleware (or anything that modifies the request context)
'edxmako.middleware.MakoMiddleware'
,
...
...
@@ -415,6 +417,21 @@ MODULESTORE = {
}
}
#################### Python sandbox ############################################
CODE_JAIL
=
{
# Path to a sandboxed Python executable. None means don't bother.
'python_bin'
:
None
,
# User to run as in the sandbox.
'user'
:
'sandbox'
,
# Configurable limits.
'limits'
:
{
# How many CPU seconds can jailed code use?
'CPU'
:
1
,
},
}
############################ DJANGO_BUILTINS ################################
# Change DEBUG in your environment settings files, not here
DEBUG
=
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment