Skip to content

Conversation

GalacticHypernova
Copy link
Contributor

Resolves #586

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

For users utilizing Nuxt Image (with its option to provide custom nonces), Nuxt Security will override the user-defined nonce to ensure standard-complying, cryptographically secure nonces.

As a side note, it is worth deprecating the nonce property in Nuxt Image regardless due to the security concerns it brings with no proportionate benefit

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

Copy link

vercel bot commented Dec 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
security ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 28, 2024 5:36pm

@GalacticHypernova
Copy link
Contributor Author

GalacticHypernova commented Dec 28, 2024

I originally thought about making the nonce detection directly within the link regex, but I couldn't find as of this moment a pattern that is not susceptible to a ReDoS (regular expression denial of service) attack. Therefore, I introduced a new regex to compare for each found link.

@vejja
Copy link
Collaborator

vejja commented Dec 30, 2024

This one looks ok to me

Copy link
Owner

@Baroshem Baroshem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@Baroshem Baroshem changed the base branch from main to chore/2.2.0 March 4, 2025 07:40
@Baroshem Baroshem merged commit 28472dd into Baroshem:chore/2.2.0 Mar 4, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(nonce): duplication

3 participants