Skip to content

Commit 9f1bdf7

Browse files
committed
fix: update comments to clarify localhost image handling in SongThumbnail and SongPage components
- Added TODO comments in SongThumbnail.tsx and SongPage.tsx to address localhost image handling for Next.js 15 private IP errors. - Improved clarity regarding security implications related to CVE-2025-55173.
1 parent d9f578b commit 9f1bdf7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/frontend/src/modules/shared/components/layout/SongThumbnail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const SongThumbnail = ({
99
src: string;
1010
fallbackSrc?: string;
1111
}) => {
12-
// Check if the image is from localhost to avoid Next.js 15 private IP errors
12+
// TODO:Check if the image is from localhost to avoid Next.js 15 private IP errors
1313
// Next.js 15 blocks images from private IPs (localhost, 127.0.0.1, ::1) for security reasons.
1414
// This is related to CVE-2025-55173 security vulnerability.
1515
// Sources:

apps/frontend/src/modules/song/components/SongPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export async function SongPage({ id }: { id: string }) {
6464
console.error('Failed to retrieve suggested songs');
6565
}
6666

67-
// Check if the image is from localhost to avoid Next.js 15 private IP errors
67+
// TODO: Check if the image is from localhost to avoid Next.js 15 private IP errors
6868
// Next.js 15 blocks images from private IPs (localhost, 127.0.0.1, ::1) for security reasons.
6969
// This is related to CVE-2025-55173 security vulnerability.
7070
// Sources:
@@ -86,7 +86,7 @@ export async function SongPage({ id }: { id: string }) {
8686
<div className='col-span-full lg:col-span-5 flex flex-col gap-4'>
8787
{/* Song thumbnail */}
8888
{/* TODO: implement loading https://github.com/vercel/next.js/discussions/50617 */}
89-
<picture className='bg-zinc-800 aspect-[5/3] rounded-xl'>
89+
<picture className='bg-zinc-800 aspect-5/3 rounded-xl'>
9090
<Image
9191
unoptimized={isLocalhost}
9292
alt='Song thumbnail'

0 commit comments

Comments
 (0)