-
Notifications
You must be signed in to change notification settings - Fork 0
Coding challenge (Rafael Macapagal) #3
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,6 +8,7 @@ import CommentSection from "@/components/CommentSection"; // Import the componen | |||||||||||||
| interface File { | ||||||||||||||
| id: string; | ||||||||||||||
| name: string; | ||||||||||||||
| filename: string | ||||||||||||||
|
||||||||||||||
| filename: string | |
| filename: string; |
Copilot
AI
Jul 31, 2025
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.
Missing semicolon at the end of the statement. This is inconsistent with the coding style used elsewhere in the file.
| setFileLoading(true) | |
| setFileLoading(true); |
Copilot
AI
Jul 31, 2025
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.
Missing semicolon at the end of the statement. This is inconsistent with the coding style used elsewhere in the file.
| console.error("file not found!") | |
| setFileLoading(false) | |
| return | |
| console.error("file not found!"); | |
| setFileLoading(false); | |
| return; |
Copilot
AI
Jul 31, 2025
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.
Using dangerouslySetInnerHTML with unsanitized HTML content from the server creates a potential XSS vulnerability. Consider sanitizing the HTML content before rendering.
Copilot
AI
Jul 31, 2025
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.
The iframe is missing important security attributes. Consider adding 'sandbox' and 'title' attributes for better security and accessibility.
| <iframe src={link} width={750} height={1000} /> | |
| <iframe src={link} width={750} height={1000} sandbox="allow-scripts allow-same-origin" title="PDF Viewer" /> |
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.
Inconsistent error response format. This endpoint uses 'message' property while other error responses use 'error' property. Should be consistent across the API.