Commit Graph

12898 Commits

Author SHA1 Message Date
Ned Batchelder
768665067f Update the CodeJail we want. 2013-05-14 14:52:30 -04:00
Ned Batchelder
29f4566a00 Change the XBlock target hash, not because we need new code, but because the old one was tangled up in a eponymous branch that was causing trouble. 2013-05-13 17:27:21 -04:00
Ned Batchelder
b682e1c0d3 Put a feature flag around the staff-only debugging page. 2013-05-13 17:07:13 -04:00
jarv
1201d11701 Merge pull request #2025 from edx/jarv/sandbox-pre-requirements
adding pre-requirements for sandbox-requirements.txt
2013-05-13 11:15:11 -07:00
John Jarvis
c98ab686e6 adding pre-requirements for sandbox-requirements.txt 2013-05-13 14:11:28 -04:00
Ned Batchelder
ce3e733d1f Problems in 7.02x need lxml for their sandbox. 2013-05-08 14:49:02 -04:00
Ned Batchelder
6264d41f92 Very minor docstring tweak :) 2013-05-08 14:48:46 -04:00
Ned Batchelder
91db1eed4c The new settings will only be read from .json files if aws.py handles them. 2013-05-06 18:06:08 -04:00
Ned Batchelder
3da841ea2b Pin codejail to a specific commit so it will get installed properly on deploying. 2013-05-06 17:16:35 -04:00
Ned Batchelder
8ad87a693b Merge pull request #1954 from edx/fix/will/md5-unicode-error
Fix UnicodeEncodeError when generating cache keys
2013-05-06 12:45:47 -07:00
Will Daly
4f33b8e0c0 Fixed a UnicodeEncodeError that occurred when generating cache keys
from non-ASCII unicode code submissions.
2013-05-06 15:04:20 -04:00
Ned Batchelder
e3de0dc847 A fuller unit test with a real 8.02x problem. 2013-05-06 11:39:22 -04:00
Ned Batchelder
7cb3987f94 Ugh, missing import. 2013-05-06 11:39:21 -04:00
Ned Batchelder
686eb64949 An example of how to set the CPU limit for codejail. 2013-05-06 11:39:21 -04:00
Ned Batchelder
403218ec6b If sandboxed code raises an exception, the exception will be cached. 2013-05-06 11:39:21 -04:00
Ned Batchelder
001ef7b0fe Use only safe characters for the cache key 2013-05-06 11:39:21 -04:00
Ned Batchelder
d8c22dbeb3 Add a Django setting for course allowed to run unsafe code. 2013-05-06 11:39:21 -04:00
Ned Batchelder
d7ea1dafe8 On second thought, make can_execute_unsafe_code a function returning a boolean. 2013-05-06 11:39:21 -04:00
Ned Batchelder
f1fac732cf A new boolean on XModuleSystem that determines whether to allow execution of untrusted unsandboxed code. 2013-05-06 11:39:21 -04:00
Ned Batchelder
f4d84e67e1 Build the XModuleSystem anew for each test so we can fiddle with it safely. 2013-05-06 11:39:21 -04:00
Ned Batchelder
0ba4b680f9 Minor fixes of test_system in xmodule tests 2013-05-06 11:39:21 -04:00
Ned Batchelder
477fe670dd All re-randomization has to be bucketed to get a reasonable cache hit rate. 2013-05-06 11:39:20 -04:00
Will Daly
7b26c50e32 Added instructions for clearing the cache before running tests 2013-05-06 11:39:20 -04:00
Will Daly
ac660ead3e Added load test of CustomResponse 2013-05-06 11:39:20 -04:00
Will Daly
0b2aedb4fe Added datadog monitoring of safe_exec() time 2013-05-06 11:39:20 -04:00
Ned Batchelder
05021377d4 Make the correct link to the codejail repo 2013-05-06 11:39:20 -04:00
Ned Batchelder
baa6b4e3e4 The cache key for safe_exec has to be hashed to keep it a reasonable size. 2013-05-06 11:39:20 -04:00
Ned Batchelder
09fbbe7bfa Codejail is in its own repo now. 2013-05-06 11:39:20 -04:00
Ned Batchelder
adde939831 Clarify some comments in tests. 2013-05-06 11:39:20 -04:00
Ned Batchelder
726e8db13e Add more docs 2013-05-06 11:39:20 -04:00
Ned Batchelder
fb5343237a jail_code can execute a provided file also. 2013-05-06 11:39:20 -04:00
Ned Batchelder
9683098f3d Python should have -E, not sure of a clean way to do it, but this at least only applies it to python. 2013-05-06 11:39:20 -04:00
Ned Batchelder
bde976dad2 Refactor code_jail to accommodate non-Python code. 2013-05-06 11:39:19 -04:00
Ned Batchelder
55e910aafc Not sure why my branch was ahead of master for the version of distribute. Make them the same. 2013-05-06 11:39:19 -04:00
Ned Batchelder
bcdc11c3a5 Hint functions are now run in the sandbox. 2013-05-06 11:39:19 -04:00
Ned Batchelder
ed13f0a0f1 Catch up to new exception handling in responses. 2013-05-06 11:39:19 -04:00
Ned Batchelder
5e7d328e7f Use the Django cache for sandboxed code execution. 2013-05-06 11:39:19 -04:00
Ned Batchelder
c8b908a244 capa.safe_exec can use a cache. 2013-05-06 11:39:19 -04:00
Ned Batchelder
5e8e31b2d1 Add a cache attribute to ModuleSystem 2013-05-06 11:39:19 -04:00
Ned Batchelder
ceb6cedaae Fix merge 2013-05-06 11:39:19 -04:00
Ned Batchelder
182a1a1899 Cleanups 2013-05-06 11:39:19 -04:00
Ned Batchelder
0021b0acb3 Refactor to move assumed_imports into capa, so that code_jail is more pure. 2013-05-06 11:39:19 -04:00
Ned Batchelder
89f6ef8407 Move capa/safe_exec into its own directory, in prep for moving code here. 2013-05-06 11:39:18 -04:00
Ned Batchelder
d925604113 Clarify provenance 2013-05-06 11:39:18 -04:00
Ned Batchelder
efaa0eea03 More fixes to the merge, now all tests pass. 2013-05-06 11:39:18 -04:00
Ned Batchelder
be79810ff6 Fix one problem from the merges 2013-05-06 11:39:18 -04:00
Will Daly
f62dad2f57 Added symbolic response tests 2013-05-06 11:39:18 -04:00
Ned Batchelder
e61a6fe787 Make it possible for customresponse check functions to get extra arguments, though they need to be declared in the XML. 2013-05-06 11:39:18 -04:00
Ned Batchelder
c49b0c5027 Have to make the globals json-safe before sending them to the sandbox. 2013-05-06 11:39:18 -04:00
Ned Batchelder
7aa493ec85 A start on getting these tests to run again. 2013-05-06 11:39:18 -04:00