Skip to content

fix(nonce): duplication #586

@dargmuesli

Description

@dargmuesli

Environment

- Operating System: Linux
- Node Version:     v22.12.0
- Nuxt Version:     -
- CLI Version:      3.16.0
- Nitro Version:    -
- Package Manager:  [email protected]
- Builder:          -
- User Config:      -
- Runtime Modules:  -
- Build Modules:    -

Nuxt Security Version

v2.1.5

Default setup used?

Yes, the bug happens even if the security option is not customized

Reproduction

will provide if necessary

Description

Currently a nonce is added to elements regardless of a nonce being applied already. For example, the nuxt/image module allows to set nonces for image preload links. The regexes could be changed to not match elements which already have a nonce added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions