Skip to content

hardenIntrinsics() twice emits ses_already_locked_down #2760

@leotm

Description

@leotm

Describe the bug

Calling hardenIntrinsics() twice unknowingly, emits SES_ALREADY_LOCKED_DOWN

which isn't immediately clear it's because we're repairing twice

const hardenIntrinsics = repairIntrinsics(options);

(also depending on the React Native version the stack trace may not be clear)

ideally we should emit either

1 SES_ALREADY_REPAIRED or SES_ALREADY_HARDENED (similar original behaviour)
2 ignore subsequent calls to hardenIntrinsics()

Steps to reproduce

Call hardenIntrinsics() more than once

Platform environment

Additional context

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions