Skip to content

Drop can_execute_unsafe_code and the unsafely argument #350

Backlog

Description

@feanil

Running course code outside the sandbox has been gone since 3.0.0: safe_exec raises ImproperlyConfigured when unsafely is True (

). openedx/openedx-platform#39429 drops the platform's last read of COURSES_WITH_UNSAFE_CODE, so the platform's SandboxService.can_execute_unsafe_code always returns False and only stays because ProblemBlock still reads it when it builds the LoncapaSystem:
can_execute_unsafe_code=sandbox_service.can_execute_unsafe_code,

We should:

  • Stop reading can_execute_unsafe_code from the sandbox service in ProblemBlock, and drop the can_execute_unsafe_code argument from LoncapaSystem.
  • Drop the unsafely argument from safe_exec, and the calls in capa_problem.py and responsetypes.py that pass it.

Both are breaking, so they go in a major release. Once the platform is on that release, the SandboxService.can_execute_unsafe_code shim in xmodule/util/sandboxing.py and the can_execute_unsafe_code arguments in the platform's xmodule/capa_block.py can go too.

Part of openedx/openedx-platform#36639.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions