Skip to content

fix: add noopener to window.open call in AnnouncementToastProvider#971

Open
LikiosSedo wants to merge 1 commit intoMODSetter:devfrom
LikiosSedo:fix/window-open-noopener
Open

fix: add noopener to window.open call in AnnouncementToastProvider#971
LikiosSedo wants to merge 1 commit intoMODSetter:devfrom
LikiosSedo:fix/window-open-noopener

Conversation

@LikiosSedo
Copy link
Contributor

@LikiosSedo LikiosSedo commented Mar 25, 2026

Summary

  • Add noopener,noreferrer to window.open() call in AnnouncementToastProvider to prevent the opened page from accessing window.opener

Test plan

  • Verify announcement toast links still open correctly in a new tab
  • Verify window.opener is null in the opened page

High-level PR Summary

This PR adds security parameters noopener and noreferrer to the window.open() call in the AnnouncementToastProvider component. This prevents newly opened pages from accessing the window.opener property, which protects against potential tabnabbing attacks where malicious sites could manipulate the opener page.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_web/components/announcements/AnnouncementToastProvider.tsx

Need help? Join our Discord

Analyze latest changes

@vercel
Copy link

vercel bot commented Mar 25, 2026

@LikiosSedo is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@recurseml recurseml bot left a comment

Choose a reason for hiding this comment

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

Review by RecurseML

🔍 Review performed on a474c46..227fb01

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (1)

surfsense_web/components/announcements/AnnouncementToastProvider.tsx

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.

1 participant