Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b93f838f82
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| String fileName = UUID.randomUUID() + "_" + file.getOriginalFilename(); | ||
| Path target = UPLOADS_ROOT.resolve(fileName); |
There was a problem hiding this comment.
Sanitize attachment filenames before resolving upload path
file.getOriginalFilename() is concatenated directly into UPLOADS_ROOT.resolve(...), so a crafted multipart filename containing traversal segments (for example ../../../../...) can resolve outside the uploads directory and overwrite arbitrary writable files on the server. Because this is reachable from the task create/update APIs, this is a real write-path traversal risk; normalize and validate the resolved path stays under UPLOADS_ROOT (and strip path separators from client filenames).
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| String token = authHeader.substring(7); | ||
| String email = jwtService.extractUsername(token); |
There was a problem hiding this comment.
Catch JWT parsing failures in authentication filter
The filter calls jwtService.extractUsername(token) without handling parse/validation exceptions, so malformed, expired, or tampered bearer tokens will throw out of the filter and produce a 500 instead of an authentication failure response. Any client can trigger this on protected endpoints by sending an invalid Authorization header, so these failures should be caught and converted to an unauthorized flow.
Useful? React with 👍 / 👎.
|
|
||
| @Override | ||
| public AuthResponse signup(SignupRequest request) { | ||
| if (userRepository.existsByEmail(request.getEmail())) { |
There was a problem hiding this comment.
Normalize email before checking signup uniqueness
Signup checks existsByEmail(request.getEmail()) before normalizing case, but persists request.getEmail().toLowerCase(). On case-sensitive databases, an existing user@example.com can be missed by the pre-check when the input is USER@example.com, then the insert of the normalized value hits the unique constraint and surfaces as a server error instead of a controlled "already registered" response. Normalize first and use the normalized value consistently for lookup and save.
Useful? React with 👍 / 👎.
Codex generated this pull request, but encountered an unexpected error after generation. This is a placeholder PR message.
Codex Task