Exploit databaseDownload repository ZIP
GH-f2ffb5960907ad8eac080b6cb603fe65
t3tra-dev/cve-2025-29927-demo
Sources for CVE-2025-29927
158 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files9
t3tra-dev/cve-2025-29927-demoRevision ca0951370c76
- app/
- .gitignore
- README.md
- eslint.config.mjs
- middleware.ts
- next.config.ts
- package-lock.json
- package.json
- tsconfig.json
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
middleware.ts
Suggested starting fileTypeScript · 816 bytesimport { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
// 保護されたルートへのアクセスを制限するミドルウェア
export function middleware(request: NextRequest) {
// 保護されたルートへのアクセスをチェック
if (request.nextUrl.pathname.startsWith("/protected")) {
// クッキーから認証状態を確認
const authCookie = request.cookies.get("auth");
// 認証されていない場合はログインページにリダイレクト
if (!authCookie || authCookie.value !== "authenticated") {
return NextResponse.redirect(new URL("/login", request.url));
}
}
return NextResponse.next();
}
// ミドルウェアを適用するパスを指定
export const config = {
matcher: ["/protected/:path*"],
};