Skip to content

fix: ensure all external social links open in new tab with proper security attributes.#705

Closed
TarequeSyed wants to merge 2 commits intoAOSSIE-Org:mainfrom
TarequeSyed:main
Closed

fix: ensure all external social links open in new tab with proper security attributes.#705
TarequeSyed wants to merge 2 commits intoAOSSIE-Org:mainfrom
TarequeSyed:main

Conversation

@TarequeSyed
Copy link
Copy Markdown

@TarequeSyed TarequeSyed commented Mar 26, 2026

Addressed Issues:

Fixes #702

Screenshots/Recordings:

Not applicable (minor UI behavior fix)

Additional Notes:

Fixed inconsistent behavior in social media links.

The hero section links (e.g., YouTube) were opening in the same tab due to missing target="_blank".
Added target="_blank" and rel="noopener noreferrer" to all the social media handles icons to ensure:

  1. Consistent behavior across the website (matches footer)
  2. Improved security (prevents tabnabbing)

Tested locally and verified that all external links now open in a new tab.

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

☑︎] This PR does not contain AI-generated code at all.
[ ] This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: None

Checklist

☑︎ My PR addresses a single issue, fixes a single bug or makes a single improvement.
☑︎ My code follows the project's code style and conventions
[ ] If applicable, I have made corresponding changes or additions to the documentation
[ ] If applicable, I have made corresponding changes or additions to tests
☑︎ My changes generate no new warnings or errors
☑︎ I have joined the Discord server and I will share a link to this PR with the project maintainers there
☑︎ I have read the Contribution Guidelines
☑︎ Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
☑︎ I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced security for external links opening in new browser tabs. Updated multiple external links throughout the app, including mail and YouTube subscription links, with improved security protections.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b07687e5-8a0c-43b9-91ce-160fb9674c01

📥 Commits

Reviewing files that changed from the base of the PR and between bcb1142 and e1b3432.

📒 Files selected for processing (2)
  • src/app/page.jsx
  • src/components/shared/Footer.jsx

📝 Walkthrough

Walkthrough

This pull request adds security attributes to external links across two files. The rel='noopener noreferrer' attribute is added to existing external links with target="_blank", and the YouTube subscription link receives both target="_blank" and rel='noopener noreferrer' for the first time. The mail link in the Footer also receives these same attributes.

Changes

Cohort / File(s) Summary
External Link Security Hardening
src/app/page.jsx
Added rel='noopener noreferrer' to social media links (GitHub, Discord, LinkedIn, X/Twitter) and mail link that already had target="_blank". YouTube subscription link now includes both target='_blank' and rel='noopener noreferrer'.
Footer Mail Link Security
src/components/shared/Footer.jsx
Added target="_blank" and rel="noopener noreferrer" to the "Contact by Mail" link for consistent security practices.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • Zahnentferner

Poem

🐰 Hops with glee, a bunny declares:
Security wrapped in link affairs,
No openers leak, referrers hide away,
External jumps are safer today! 🔐✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding proper security attributes (rel='noopener noreferrer') and target='_blank' to external social links across the application.
Linked Issues check ✅ Passed All requirements from issue #702 are met: rel='noopener noreferrer' added to hero section social icons, target='_blank' and rel='noopener noreferrer' added to YouTube icon, and both attributes added to mail icon in footer.
Out of Scope Changes check ✅ Passed All changes are directly related to issue #702 and the PR objectives; no unrelated modifications to logic, component behavior, or other features are present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch main

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

rel="noopener noreferrer" is missing from social icons and YouTube icon doesn't even have target="_blank"

1 participant