Skip to content

Unsafe constantize #36

Description

@dopamine-py

field.singularize.classify.constantize

can cause arbitrary class loading or potential exploitation / unexpected behavior

model_class = ALLOWED_ASSOCIATIONS[field.to_sym]
fail %(Association "#{field}" not allowed) unless model_class

filter_result = parse_filters(data, safe, model_class)

fix to this

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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