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

Comments

fix!: remove nonce prop#1995

Open
GalacticHypernova wants to merge 6 commits intonuxt:main from
GalacticHypernova:patch-1
Open

fix!: remove nonce prop #1995
GalacticHypernova wants to merge 6 commits intonuxt:main from
GalacticHypernova:patch-1

Conversation

@GalacticHypernova
Copy link

@GalacticHypernova GalacticHypernova commented Oct 29, 2025
edited
Loading

🔗 Linked issue

#1654

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

As continuation of #1654 , and with the approach of Nuxt Image v2, I think it is time to drop the nonce attribute.
As stated in the original issue, allowing users to inject their own nonce is very dangerous, as it doesn't enforce the nonce is cryptographically secure, generated according to the spec, or unique across the app. It is much better to let dedicated security modules like Nuxt Security handle the nonce generation.

This PR is marked as breaking as it changes behavior, even though it won't actually break any projects (except maybe failing to load images in certain projects that relied on the nonce prop) because it simply voids the property.

DamianGlowala and dargmuesli reacted with thumbs up emoji
Copy link

pkg-pr-new bot commented Oct 29, 2025
edited
Loading

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/image@1995

commit: dc98a9f

Copy link

codecov-commenter commented Oct 29, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 7.04%. Comparing base (6022fa8) to head (dc98a9f).

Additional details and impacted files
@@ Coverage Diff @@
## main #1995 +/- ##
=====================================
 Coverage 7.03% 7.04% 
=====================================
 Files 77 77 
 Lines 3567 3565 -2 
 Branches 138 138 
=====================================
 Hits 251 251 
+ Misses 3268 3266 -2 
 Partials 48 48 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GalacticHypernova GalacticHypernova marked this pull request as ready for review October 29, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@danielroe danielroe Awaiting requested review from danielroe danielroe is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /