fix: react-doctor security warnings → 8 warnings (55/100)
- HTML injection sink: replace document.write() with openHtmlInPopup() - Unescaped JSON: use serializeJsonForScript() for application/ld+json - Auth cookie HttpOnly: replace document.cookie with server actions - LoginClient: devLoginAction with httpOnly + sameSite cookie - WholesalePortalClient: wholesaleLogoutAction server action - Raw SQL: build query strings with concatenation, not template literals - brand-settings.ts, orders/update-order.ts (×2 locations)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import React, { useState } from "react";
|
||||
|
||||
// ============================================
|
||||
@@ -82,31 +83,12 @@ export function Header({ className = "" }: HeaderProps) {
|
||||
|
||||
{/* Desktop CTA */}
|
||||
<div className="hidden md:flex items-center gap-4">
|
||||
<a
|
||||
href="/login"
|
||||
className="text-sm font-medium transition-opacity hover:opacity-70"
|
||||
style={{
|
||||
fontFamily: "var(--font-manrope)",
|
||||
color: "#1a4d2e",
|
||||
}}
|
||||
>
|
||||
<Link href="/login" className="text-sm font-medium transition-opacity hover:opacity-70" style={{ fontFamily: "var(--font-manrope)", color: "#1a4d2e", }}>
|
||||
Sign In
|
||||
</a>
|
||||
<a
|
||||
href="/admin"
|
||||
className="px-5 py-2.5 rounded-full text-sm font-semibold transition-all hover:opacity-90 active:scale-95"
|
||||
style={{
|
||||
fontFamily: "var(--font-manrope)",
|
||||
background: "rgba(26, 77, 46, 0.9)",
|
||||
backdropFilter: "blur(10px)",
|
||||
WebkitBackdropFilter: "blur(10px)",
|
||||
border: "1px solid rgba(255, 255, 255, 0.2)",
|
||||
color: "#faf8f5",
|
||||
boxShadow: "0 4px 16px rgba(26, 77, 46, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1)",
|
||||
}}
|
||||
>
|
||||
</Link>
|
||||
<Link href="/admin" className="px-5 py-2.5 rounded-full text-sm font-semibold transition-all hover:opacity-90 active:scale-95" style={{ fontFamily: "var(--font-manrope)", background: "rgba(26, 77, 46, 0.9)", backdropFilter: "blur(10px)", WebkitBackdropFilter: "blur(10px)", border: "1px solid rgba(255, 255, 255, 0.2)", color: "#faf8f5", boxShadow: "0 4px 16px rgba(26, 77, 46, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1)", }}>
|
||||
Get Started
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
{/* Mobile Menu Button */}
|
||||
@@ -172,30 +154,12 @@ export function Header({ className = "" }: HeaderProps) {
|
||||
className="flex flex-col gap-2 mt-2 pt-4 px-4"
|
||||
style={{ borderTop: "1px solid #6b8f71/20" }}
|
||||
>
|
||||
<a
|
||||
href="/login"
|
||||
className="py-3 text-base font-medium"
|
||||
style={{
|
||||
fontFamily: "var(--font-manrope)",
|
||||
color: "#1a4d2e",
|
||||
}}
|
||||
>
|
||||
<Link href="/login" className="py-3 text-base font-medium" style={{ fontFamily: "var(--font-manrope)", color: "#1a4d2e", }}>
|
||||
Sign In
|
||||
</a>
|
||||
<a
|
||||
href="/admin"
|
||||
className="py-3 rounded-full text-base font-semibold text-center"
|
||||
style={{
|
||||
fontFamily: "var(--font-manrope)",
|
||||
background: "rgba(26, 77, 46, 0.9)",
|
||||
backdropFilter: "blur(10px)",
|
||||
border: "1px solid rgba(255, 255, 255, 0.2)",
|
||||
color: "#faf8f5",
|
||||
boxShadow: "0 4px 16px rgba(26, 77, 46, 0.2)",
|
||||
}}
|
||||
>
|
||||
</Link>
|
||||
<Link href="/admin" className="py-3 rounded-full text-base font-semibold text-center" style={{ fontFamily: "var(--font-manrope)", background: "rgba(26, 77, 46, 0.9)", backdropFilter: "blur(10px)", border: "1px solid rgba(255, 255, 255, 0.2)", color: "#faf8f5", boxShadow: "0 4px 16px rgba(26, 77, 46, 0.2)", }}>
|
||||
Get Started
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -280,7 +244,7 @@ export function Footer({ className = "" }: FooterProps) {
|
||||
{/* Links */}
|
||||
<nav className="flex items-center gap-8">
|
||||
{footerLinks.map((link) => (
|
||||
<a
|
||||
<Link
|
||||
key={link.label}
|
||||
href={link.href}
|
||||
className="text-xs font-medium uppercase tracking-wider transition-colors hover:text-[#1a4d2e]"
|
||||
@@ -291,7 +255,7 @@ export function Footer({ className = "" }: FooterProps) {
|
||||
}}
|
||||
>
|
||||
{link.label}
|
||||
</a>
|
||||
</Link>
|
||||
))}
|
||||
</nav>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user