Commit Graph

3492 Commits

Author SHA1 Message Date
Ned Batchelder
a40aed58d0 Clean up 2013-05-06 10:55:06 -04:00
Ned Batchelder
4fb73248ba Try to get <symbolicresponse> test running. (Not yet) 2013-05-06 10:55:06 -04:00
Ned Batchelder
4b234a63a3 Future division is really a capa concern, not a general-purpose codejail concern. Move it. 2013-05-06 10:55:06 -04:00
Ned Batchelder
7187b10f9c Use the python_path argument to safe_exec 2013-05-06 10:55:06 -04:00
Ned Batchelder
a04317b31d Files are properly copied in both implementations of safe_exec, and a new python_path argument adds to the python path. 2013-05-06 10:55:06 -04:00
Ned Batchelder
abb9174559 Refactor how script chunks are run. 2013-05-06 10:55:06 -04:00
Ned Batchelder
12b6876753 safe_exec seeds the random module, and now we have tests for it. 2013-05-06 10:55:06 -04:00
Ned Batchelder
ab8a3050fd Don't use jailpy if it hasn't been configured. 2013-05-06 10:55:05 -04:00
Ned Batchelder
d99eadc0a2 Refactor the assumed_imports handling 2013-05-06 10:55:05 -04:00
Ned Batchelder
eb85696347 Tests for safe_exec 2013-05-06 10:55:05 -04:00
Ned Batchelder
5d4b61c7f5 Better configuration for codejail. 2013-05-06 10:55:05 -04:00
Ned Batchelder
30748a06ff Try to find the sandbox in a few places. 2013-05-06 10:55:05 -04:00
Ned Batchelder
716a97ea59 Symbolic response doesn't need to pre-import symmath any more, I think? 2013-05-06 10:55:05 -04:00
Ned Batchelder
e8da1b8f61 Turn off our debugging levers 2013-05-06 10:55:05 -04:00
Ned Batchelder
3316aeb032 Add back the not_safe_exec implementation, for debugging. 2013-05-06 10:55:05 -04:00
Ned Batchelder
ebb2624719 Make jailpy tests more convenient and informative. 2013-05-06 10:55:05 -04:00
Ned Batchelder
7c498be606 Move packages around so we can install packages into the sandbox. 2013-05-06 10:55:05 -04:00
Ned Batchelder
70930c25c1 Remove the unsafe version of safe_exec, and document the safe one. 2013-05-06 10:55:04 -04:00
Ned Batchelder
5db5426e05 Use the real safe_exec; make the seed available in the context. 2013-05-06 10:55:04 -04:00
Ned Batchelder
19e3a0ceb9 Implement safe_exec on top of jailpy (old unsafe safe_exec is still here); Remove some crazy stuff from the context; always pass globals and locals, locals are the things that can be changed. 2013-05-06 10:55:04 -04:00
Ned Batchelder
908f44b9cd snippets aren't used. Remove them. 2013-05-06 10:55:04 -04:00
Ned Batchelder
248017b4ea No longer need to support <coderesponse> without <codeparam>, so scrap the code. 2013-05-06 10:55:04 -04:00
Ned Batchelder
a6677aa0a8 Computed answers are run through safe_exec. 2013-05-06 10:55:04 -04:00
Ned Batchelder
37ca6bf77e Move our specialization of safe_exec into a new module to avoid circular imports. 2013-05-06 10:55:04 -04:00
Ned Batchelder
33abe54e0d Work in progress to sandbox the uses of eval in LMS. 2013-05-06 10:55:03 -04:00
Ned Batchelder
0c47f1e0b9 safe_exec can load modules for you. 2013-05-06 10:55:03 -04:00
Ned Batchelder
4bb5d14f70 Test that we can't write files 2013-05-06 10:55:03 -04:00
Ned Batchelder
6c609afdb1 LazyModule for lazily proxying module imports. 2013-05-06 10:55:03 -04:00
Ned Batchelder
17f9e4b27d A turd left over from a test 2013-05-06 10:55:03 -04:00
Ned Batchelder
f8c5305352 Add some malware tests 2013-05-06 10:55:02 -04:00
Ned Batchelder
a9979b8aae Killing processes isn't working. 2013-05-06 10:55:02 -04:00
Ned Batchelder
70c37130ac A codejail package to run code securely. 2013-05-06 10:55:02 -04:00
Sarina
72584b5937 Merge pull request #1914 from edx/fix/sarina/new_formularesponse_defaults
Fix/sarina/new formularesponse defaults
2013-05-03 12:32:10 -07:00
Sarina Canelake
2cb3af1e35 Only throw factorial-related exception on factorial raised exception 2013-05-01 10:53:22 -04:00
Christina Roberts
a537bd7f05 Merge pull request #1908 from MITx/fix/btalbot/studio-courseinfo
Fix/btalbot/studio courseinfo
2013-04-30 13:34:52 -07:00
Christina Roberts
4c97f92245 Merge pull request #1916 from MITx/fix/cdodge/more-broken-template-images
add more images to support templates
2013-04-30 09:50:41 -07:00
Chris Dodge
c5d520574d also move the MIT dome image in Latex to be in our source pack 2013-04-30 12:02:58 -04:00
Sarina Canelake
95a224fcea Fix pep8 violations 2013-04-30 11:21:20 -04:00
Sarina Canelake
573116073e Add error message when factorial given non-integral value 2013-04-30 11:16:14 -04:00
Brian Talbot
886205dec3 revised placeholder course overview HTML value 2013-04-29 17:23:14 -04:00
Chris Dodge
33aada6d22 fix broken test. Since we're pre-populating the course overview when creating a course, the clone_course fails because it asserts that the destination course that it clones into is empty. Need to check that the course is basically empty (e.g. a course module and a overview module) 2013-04-29 16:43:32 -04:00
Chris Dodge
680e932b8b use default staff images that is in /common/static/... 2013-04-29 15:42:58 -04:00
Sarina Canelake
f95331dcc1 fix more pep8 violations 2013-04-29 15:01:11 -04:00
Sarina Canelake
6993daf116 Fix pep8 violations 2013-04-29 15:01:05 -04:00
Sarina Canelake
46792c82de Remove debugging print statements 2013-04-29 15:00:54 -04:00
Sarina Canelake
ed43afb08f Add additional unit test comment 2013-04-29 15:00:45 -04:00
Sarina Canelake
696879bd26 Add unit tests for formularesponse type 2013-04-29 15:00:36 -04:00
Sarina Canelake
c79843c541 Add factorial as a default function for formula response 2013-04-29 15:00:26 -04:00
Christina Roberts
72dfd4995e Merge pull request #1903 from MITx/fix/cdodge/dangling-verticals-on-delete
Fix/cdodge/dangling verticals on delete
2013-04-29 11:58:22 -07:00
Chris Dodge
d7693d96b7 unit test should just use direct store. Also remove unused import and logging. 2013-04-29 09:18:49 -04:00