Skip to content

compile_restricted_mode #322

@zedzhen

Description

@zedzhen

In _compile_restricted_mode when passing policy!=None only str and ast.Module are allowed. In the documentation, str, unicode string, and ast.AST. I suggest allowing bytes and bytearray (ReadableBuffer), ast.Interactive and ast.Expression. ast.Interactive and ast.Expression can already be obtained after asr.parse so the security will not change. And ReadableBuffer will be handled the same way as str.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions