-
Notifications
You must be signed in to change notification settings - Fork 2
fix: 이메일 형식 변경 및 utf-8 적용 #245 #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...itseoul/permitserver/domain/admin/guestticket/core/exception/GuestEmailSendException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package com.permitseoul.permitserver.domain.admin.guestticket.core.exception; | ||
|
|
||
| public class GuestEmailSendException extends GuestTicketCoreException { | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/com/permitseoul/permitserver/domain/admin/util/PngFontUtil.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| package com.permitseoul.permitserver.domain.admin.util; | ||
|
|
||
| import lombok.AccessLevel; | ||
| import lombok.NoArgsConstructor; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.springframework.core.io.ClassPathResource; | ||
|
|
||
| import java.awt.*; | ||
| import java.io.InputStream; | ||
|
|
||
| @NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
| @Slf4j | ||
| public final class PngFontUtil { | ||
| private static final Font BASE = loadBase(); | ||
| private static final Font SIZE_12 = BASE.deriveFont(Font.PLAIN, 12f); | ||
|
|
||
|
|
||
| private static Font loadBase() { | ||
| try (InputStream is = new ClassPathResource("fonts/NotoSansKR-Regular.ttf").getInputStream()) { | ||
| return Font.createFont(Font.TRUETYPE_FONT, is); | ||
| } catch (Exception e) { | ||
| log.warn("Failed to load font", e); | ||
| return new Font("SansSerif", Font.PLAIN, 12); | ||
| } | ||
| } | ||
|
|
||
| public static Font size12() { | ||
| return SIZE_12; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
에러 로그에 이메일(PII) 포함 — 개인정보 유출 위험
Line 89-90에서
toEmail과guestName을 에러 로그에 직접 기록하고 있습니다. 이메일 주소와 이름은 개인식별정보(PII)이며, 로그 시스템에 저장될 경우 GDPR/개인정보보호법 위반 가능성이 있습니다.이메일은 마스킹 처리하거나, 식별 가능한 내부 ID로 대체하는 것을 권장합니다. 또한,
new GuestEmailSendException()에 원인 예외(e)를 전달하면 디버깅이 용이합니다.🛡️ PII 마스킹 및 예외 원인 전달 제안
} catch (Exception e) { - log.error("[Guest Ticket Email] 발송 실패 - to={}, guestName={}, event={}, ticketCount={}", - toEmail, guestName, eventName, ticketCodes.size(), e); - throw new GuestEmailSendException(); + log.error("[Guest Ticket Email] 발송 실패 - event={}, ticketCount={}", + eventName, ticketCodes.size(), e); + throw new GuestEmailSendException(e); }🤖 Prompt for AI Agents