Skip to content

Conversation

@GAMZAMANDU
Copy link
Contributor

relase/v2를 develop에 병합합니다.

obtuse-triangle and others added 30 commits November 25, 2025 00:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: obtuse-triangle <me@obtuse.kr>
…-때-손이-잘림

[I25-340] feat : 프로젝트 없는 학생은 표출하지 않음
…rage-issue

[I25-350] chore: Add Docker builder cache pruning to Jenkinsfile clea…
…ude competition names

- Added competition_name field to profileConfig and updated input configuration.
- Refactored getOrCreateCompetitionIds to accept competition names instead of prizes.
- Modified updateProfileCompetitions to handle competitions as objects containing competition_name and prize.
- Enhanced data processing for profile_competitions to ensure valid entries are maintained.
…sionSync and middleware.server

- Refactored error type assertion to use a more specific type for better type safety.
- Removed unused function imports and streamlined profile fetching in HeaderDropdown.
- Optimized textarea height adjustment in SingleInput using useCallback.
- Cleaned up unused imports in sortProjects.
…두번-연속-보임

(i25 338) feat/특정 수상이력 두번 연속 보임
Signed-off-by: obtuse-triangle <me@obtuse.kr>
…se-query

I25-345 refactor supabase query
… using external URL and others using internal URL.
…efine required field checks for array types.
…번-관련-테이블-쿼리

[I25-337] feat : 디바운스 추가 및 지연 해결
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: obtuse-triangle <me@obtuse.kr>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: LEE JEONGHYEOK <157395300+GAMZAMANDU@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: LEE JEONGHYEOK <157395300+GAMZAMANDU@users.noreply.github.com>
…onError

[I25-333]-fix/TeamExceptionError PR
GAMZAMANDU and others added 27 commits December 1, 2025 23:41
[I25-394] fix : topLabelText 오류 수정
[I25-394] feat : 뷰어에서 링크를 새 창 열기로 변경
…owner

fix: team owner도 project 추가 가능하도록 변경
…eFormConfigData to include string in initialValues and onSubmit data types
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: LEE JEONGHYEOK <157395300+GAMZAMANDU@users.noreply.github.com>
…-만들기

I25 405 사진 업로드에 임시사진 뜨게 만들기
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: LEE JEONGHYEOK <157395300+GAMZAMANDU@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: LEE JEONGHYEOK <157395300+GAMZAMANDU@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: LEE JEONGHYEOK <157395300+GAMZAMANDU@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: LEE JEONGHYEOK <157395300+GAMZAMANDU@users.noreply.github.com>
…t by filtering new items and improving shuffle logic
Comment on lines +13 to +18
const response = await fetch(url, {
headers: {
"User-Agent":
"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
},
})

Check failure

Code scanning / CodeQL

Server-side request forgery Critical

The
URL
of this request depends on a
user-provided value
.

Copilot Autofix

AI 27 days ago

To remediate this SSRF vulnerability without breaking intended functionality, the best practice is to allow outgoing requests only to a fixed set of approved hostnames and protocols. Rather than fetching any arbitrary user-provided URL, we should allow requests only to those URLs whose hostnames are included in a predefined allow-list. This can be implemented by parsing the URL parameter, comparing its hostname and protocol (e.g., must be https/http), and returning an error if the hostname is not in the allow-list or the protocol is unsafe.

The affected code is found in src/app/api/og-fetch/route.ts, specifically at the assignment to url and the fetch(url, ...) call. We need to:

  • Define an allow-list of permitted hostnames.
  • Parse the provided url parameter safely using the WHATWG URL constructor.
  • Reject the request early with a clear 400 error if:
    • The URL is not valid.
    • The protocol is not "http:" or "https:".
    • The hostname does not match the allow-list.
  • Only invoke fetch if these conditions are met.

No new external packages are strictly necessary: the standard library's URL module suffices for parsing and validation.


Suggested changeset 1
src/app/api/og-fetch/route.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/app/api/og-fetch/route.ts b/src/app/api/og-fetch/route.ts
--- a/src/app/api/og-fetch/route.ts
+++ b/src/app/api/og-fetch/route.ts
@@ -5,12 +5,33 @@
   const { searchParams } = new URL(request.url)
   const url = searchParams.get("url")
 
+  // Allow-list of permitted hostnames (add or adjust as needed)
+  const ALLOWED_HOSTNAMES = [
+    "example.com",
+    "another-allowed-host.com"
+  ]
+
   if (!url) {
     return NextResponse.json({ error: "URL is required" }, { status: 400 })
   }
 
+  let parsedUrl: URL
   try {
-    const response = await fetch(url, {
+    parsedUrl = new URL(url)
+  } catch {
+    return NextResponse.json({ error: "Invalid URL" }, { status: 400 })
+  }
+
+  if (!["http:", "https:"].includes(parsedUrl.protocol)) {
+    return NextResponse.json({ error: "Only http(s) URLs are allowed" }, { status: 400 })
+  }
+
+  if (!ALLOWED_HOSTNAMES.includes(parsedUrl.hostname)) {
+    return NextResponse.json({ error: "Hostname is not allowed" }, { status: 400 })
+  }
+
+  try {
+    const response = await fetch(parsedUrl.toString(), {
       headers: {
         "User-Agent":
           "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
EOF
@@ -5,12 +5,33 @@
const { searchParams } = new URL(request.url)
const url = searchParams.get("url")

// Allow-list of permitted hostnames (add or adjust as needed)
const ALLOWED_HOSTNAMES = [
"example.com",
"another-allowed-host.com"
]

if (!url) {
return NextResponse.json({ error: "URL is required" }, { status: 400 })
}

let parsedUrl: URL
try {
const response = await fetch(url, {
parsedUrl = new URL(url)
} catch {
return NextResponse.json({ error: "Invalid URL" }, { status: 400 })
}

if (!["http:", "https:"].includes(parsedUrl.protocol)) {
return NextResponse.json({ error: "Only http(s) URLs are allowed" }, { status: 400 })
}

if (!ALLOWED_HOSTNAMES.includes(parsedUrl.hostname)) {
return NextResponse.json({ error: "Hostname is not allowed" }, { status: 400 })
}

try {
const response = await fetch(parsedUrl.toString(), {
headers: {
"User-Agent":
"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
Copilot is powered by AI and may make mistakes. Always verify output.
dependabot bot and others added 2 commits December 12, 2025 17:48
Bumps [next](https://github.com/vercel/next.js) from 15.5.6 to 15.5.9.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](vercel/next.js@v15.5.6...v15.5.9)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…/next-15.5.9

Bump next from 15.5.6 to 15.5.9
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.

5 participants