Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rephrase ast.literal_eval() to remove any security warranty #95588

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@vstinner

Description

@vstinner

Currently,ast.literal_eval() documentation gives multiple security warranties:

  • Safely evaluate
  • This can be used forsafely evaluating strings containing Python values fromuntrusted sources

IMO that's plain wrong if you read the following RED WARNING:

It is possible tocrash the Python interpreter (...)

The documentation should be rephrased to only described the purpose of the function and make it very clear that it must NOT be used on untrusted sources.

We can follow the phrasing of the pickle documentation:https://docs.python.org/dev/library/pickle.html

The pickle module isnot secure. Only unpickle data you trust.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp