Skip to content

Comments

[FIX] 이미지 url 사이즈 제거 (#358)#359

Merged
lingard1234 merged 2 commits intodevfrom
fix/358-profileurl
Feb 10, 2026
Merged

[FIX] 이미지 url 사이즈 제거 (#358)#359
lingard1234 merged 2 commits intodevfrom
fix/358-profileurl

Conversation

@lingard1234
Copy link
Contributor

Summary

프로필 카드 수정 API에서 profileImageUrl의 불필요한 길이 제한을 제거했습니다.

Changes

profileImageUrl 필드의 @SiZe(max = 255) 검증 제거

URL 문자열 길이 초과로 인한 프로필 이미지 수정 실패 문제 해결

Type of Change

  • Bug fix (기존 기능에 영향을 주지 않는 버그 수정)
  • New feature (기존 기능에 영향을 주지 않는 새로운 기능 추가)
  • Breaking change (기존 기능에 영향을 주는 수정)
  • Refactoring (기능 변경 없는 코드 개선)
  • Documentation (문서 수정)
  • Chore (빌드, 설정 등 기타 변경)
  • Release (develop → main 배포)

Related Issues

Fixes #358

참고 사항

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @lingard1234, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 프로필 카드 업데이트 시 프로필 이미지 URL의 길이 제한으로 인해 발생하던 버그를 수정합니다. 기존에는 URL 길이가 255자를 초과하면 업데이트가 실패했지만, 해당 제한을 제거함으로써 사용자가 더 긴 이미지 URL을 사용할 수 있도록 하여 프로필 이미지 수정의 안정성을 높였습니다.

Highlights

  • 프로필 이미지 URL 길이 제한 제거: 프로필 카드 수정 API에서 profileImageUrl 필드에 적용되었던 불필요한 @SiZe(max = 255) 검증을 제거하여, 긴 URL로 인해 프로필 이미지 수정이 실패하는 문제를 해결했습니다.
Changelog
  • src/main/java/com/example/RealMatch/user/presentation/dto/request/MyProfileCardUpdateRequestDto.java
    • profileImageUrl 필드에 적용된 @SiZe(max = 255) 어노테이션을 제거했습니다.
    • 불필요한 jakarta.validation.constraints.Size 임포트를 제거했습니다.
Activity
  • 현재까지 특별한 리뷰 활동이나 코멘트는 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@lingard1234 lingard1234 merged commit 45b36d2 into dev Feb 10, 2026
1 check passed
@lingard1234 lingard1234 deleted the fix/358-profileurl branch February 10, 2026 14:39
@lingard1234 lingard1234 self-assigned this Feb 10, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This PR aims to fix a bug by removing the length limit on the profileImageUrl. However, this change introduces a medium-severity vulnerability. The absence of length validation could lead to a Denial of Service (DoS) if an excessively long string causes a database error. Additionally, the profileImageUrl field lacks proper URL validation, opening a potential vector for Stored Cross-Site Scripting (XSS). Instead of completely removing the limit, please consider re-introducing a more generous length limit and adding URL-specific validation to mitigate these security risks and prevent unexpected database errors.


@jakarta.validation.constraints.NotBlank
@Size(max = 255)
private String profileImageUrl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

The @Size(max = 255) validation on the profileImageUrl field has been removed. While the goal was to accommodate longer URLs, removing the length validation entirely creates several risks. An excessively long string could lead to DataTruncationException if the corresponding database column has a size limit, potentially causing 500 errors and a Denial of Service. Furthermore, a malicious user could submit an extremely long string to exploit this. There is also no validation to ensure the provided string is a valid URL, which could lead to stored Cross-Site Scripting (XSS) if the profileImageUrl is rendered without proper sanitization on the client-side. To mitigate these issues, it's crucial to reintroduce a more generous length limit (e.g., @Size(max = 2048)) and add URL format validation (@URL).

    @jakarta.validation.constraints.NotBlank
    @org.hibernate.validator.constraints.URL
    @jakarta.validation.constraints.Size(max = 2048)
    private String profileImageUrl;

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.

[FIX] 프로필사진 url

1 participant