Skip to content

Commit 5485c66

Browse files
authored
fix: add noopener to external footer links to prevent reverse tabnabbing (JhaSourav07#1841) (JhaSourav07#1870)
Description This PR resolves a security vulnerability (reverse tabnabbing) in the footer. The external links to GitHub were using target="_blank" with only rel="noreferrer". I have updated these anchor tags to use rel="noopener noreferrer" to fully secure the cross-window connections, especially on legacy browsers. Fixes JhaSourav07#1841 Pillar [ ] 🎨 Pillar 1 — New Theme Design [ ] 📐 Pillar 2 — Geometric SVG Improvement [ ] 🕐 Pillar 3 — Timezone Logic Optimization [x] 🛠️ Other (Bug fix, refactoring, docs) Visual Preview <img width="923" height="385" alt="image" src="https://github.com/user-attachments/assets/69336652-6ed8-48a1-92f1-c766a089ddb9" /> Checklist before requesting a review: [x] I have read the CONTRIBUTING.md file. [x] I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME). [x] I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise). [x] My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...). [ ] I have updated README.md if I added a new theme or URL parameter. [x] I have starred the repo. [x] I have made sure that I have only one commit to merge in this PR. [ ] The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts). [x] (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.
2 parents 8f6071a + a6d0241 commit 5485c66

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

app/components/Footer.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,36 @@ import Link from 'next/link';
22

33
export function Footer() {
44
return (
5-
<footer className="mt-14 border-t border-black/15 bg-transparent pt-10 pb-4 text-sm transition-colors dark:border-white/10">
6-
<div className="mx-auto flex max-w-7xl flex-col items-start justify-between gap-8 px-6 md:flex-row">
5+
<footer className="mt-auto border-t border-black/5 bg-white/50 px-6 py-8 backdrop-blur dark:border-white/5 dark:bg-zinc-950/50">
6+
<div className="mx-auto flex max-w-6xl flex-col items-center justify-between gap-6 text-sm md:flex-row md:items-start md:gap-0">
77
{/* LEFT */}
8-
<div className="text-center md:text-left">
9-
<h2 className="text-lg font-semibold text-black dark:text-white">CommitPulse</h2>
10-
8+
<div className="flex flex-col items-center md:items-start">
9+
<span className="font-bold text-black dark:text-white">CommitPulse</span>
1110
<p className="mt-1 text-zinc-600 dark:text-zinc-400">
1211
Designed for the elite builder community.
1312
</p>
1413
</div>
1514

1615
{/* RIGHT */}
17-
<div className="flex items-start gap-6 text-sm font-medium text-zinc-600 dark:text-zinc-400">
16+
<div className="flex flex-wrap justify-center items-center gap-6 font-medium text-zinc-600 dark:text-zinc-400">
1817
<Link
1918
href="/contributors"
2019
className="transition-colors duration-200 hover:text-black dark:hover:text-white"
2120
>
2221
Contributors
2322
</Link>
24-
2523
<a
2624
href="https://github.com/JhaSourav07/commitpulse/blob/main/README.md"
2725
target="_blank"
28-
rel="noreferrer"
26+
rel="noopener noreferrer"
2927
className="transition-colors duration-200 hover:text-black dark:hover:text-white"
3028
>
3129
Documentation
3230
</a>
33-
3431
<a
3532
href="https://github.com/jhasourav07"
3633
target="_blank"
37-
rel="noreferrer"
34+
rel="noopener noreferrer"
3835
className="transition-colors duration-200 hover:text-black dark:hover:text-white"
3936
>
4037
Creator

0 commit comments

Comments
 (0)