-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feedback #1
base: feedback
Are you sure you want to change the base?
Feedback #1
Conversation
|
||
|
||
app.use(corsMiddleware); | ||
app.use(cookieParser()); |
Check failure
Code scanning / CodeQL
Missing CSRF middleware High
request handler
This cookie middleware is serving a
request handler
This cookie middleware is serving a
request handler
question-service/router/router.js
Outdated
const router = express.Router(); | ||
|
||
// CREATE NEW QUESTION | ||
router.post('/', checkAdmin, validateNewQuestion, createQuestion); |
Check failure
Code scanning / CodeQL
Missing rate limiting
user-service/models/repository.js
Outdated
} | ||
|
||
export async function _findUser(param) { | ||
return UserModel.findOne({ email: param }); |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources
.post("/", createUser) | ||
.delete("/", verifyAuthMiddleware, deleteUser) | ||
.put("/changePassword", verifyAuthMiddleware, changePassword) | ||
.put("/changeDisplayName", verifyAuthMiddleware, changeDisplayName) |
Check failure
Code scanning / CodeQL
Missing rate limiting
const app = express() | ||
|
||
// Initialise middlewares | ||
app.use(cookieParser()) |
Check failure
Code scanning / CodeQL
Missing CSRF middleware High
request handler
This cookie middleware is serving a
request handler
This cookie middleware is serving a
request handler
This cookie middleware is serving a
request handler
This cookie middleware is serving a
request handler
This cookie middleware is serving a
request handler
…19-AY2425S1/cs3219-ay2425s1-project-g05 into user-service_refresh-tokens
…project-g05 into staging
* wip: add console log * fix: hardcoded socket * fix: matching service get question before delete user * wip: add console log * feat: set up ai-chat-service backend * feat: ai-chat-service frontend component (wip) * chore: Add userId to tokens * chore: add Dockerfile * feat(history-service)!: change endpoints * chore: remove debugging statements * chore: restore user service * wip: reduce bundle size * fix: pin tabler-icons * nit: add loading to button when searching * fix: showing numbers instead of categories in search page * nit: make session full width * feat: add notifications on leave/rejoin * feat: draggable video chat window * chore: fix bugs with collab service * feat(run-service)!: implement sse for 2 users * chore: delete from redis * fix: add ability to use ws for vps * test: add test cases and fixed bugs * test: add test cases * fix: add language selector to switch languages for syntax highlighting * test * chore: cleanup console.log * nit: remove console.log * chore: modify test to test edge cases * fix: no testcase found error * chore: disable tests for some services * chore: add builds for new services and frontend * fix: modify response to include questionId * chore: hide private testcases outputs * nit: change to use personal TURN server * chore: modify response format * feat: add back stun server * fix: removed function wrongly while resolving merge conflicts * feat(run-service)!: change status to statusCode * chore: check code attempt in test * feat: run test case (send to server only) * chore: modify cors * feat: execution with loading * fix: history service url for useApi * fix: accidentally removed mongoose import while fixing merge conflicts * feat: session summary page * feat: display past attempts on dashboard (wip) * feat: test case results * feat: add old code submission entry * chore: add error handling when one client disconnects * chore: create test for disconnect * fix: add event for start of execution * wip * nit: fix error message * feat: enable parallel processing * fix: fix executing question after both clients connects error * chore: update ci and docker compose * wip: first working version of peerjs * fix: attempt details displayed on attempt card * fix: collaborator details for attempt card and session summary page * chore: delete kubernetes files * fix: history service merge conflict issues * fix: add statusCode 204 * fix: 204 statusCode in filtered question * feat: final working version * fix: add userId to accessToken * fix: correct error message * fix: id in accessToken * wip: debug * fix: different channelId issue * wip: update FE to start supporting integrations * fix: add statusCode 204 (#108) * fix: add statusCode 204 * fix: 204 statusCode in filtered question * fix: add userId to accessToken * fix: correct error message * fix: id in accessToken * chore: update docker files * chore: add dockerignore file * feat: highlight Gemini * fix: add input for questions * fix: add type * wip: query and display ai response * feat: prettify integrations * fix: ensure code editor language correspond to selected language * feat: add loading preventers * chore: dockerise ai chat service * chore: add dockerignore file * fix: run service cannot double execute, cannot refresh * wip: attempt to fix video call not ending * feat: update code viewer * fix: working history * nit: update access token to expire in 1d * fix: revert attempt to close camera * fix: dom ready * nit: enable long polling * chore: update CI * chore: update run scripts for development * feat(run-service): disable block when one user not connected to execute test case extend timeout on frontend to 20 seconds * feat(communication-service): add tooltip for indicating possiblility of changing message target, change style of changing message target * feat(communication-service): add notifications for call incoming call incoming icon now vibrates changed call icon from a video camera to a normal phone * chore: update collab * feat(collaboration-service): fix notification on one user leave fix test case cannot be submitted when one user leave add information that room will be deleted if two people leave * nit(ui): change buttons to be light variant by default * fix(matching-service): fix timer not getting deleted * nit(ui): add loading state for history * chore(communication-service): clean up unused functions * fix(collaboration-service): change to params instead of query * chore: update test code * chore: remove /filter endpoint * chore: remove file * chore: change categoriesId to enum * chore: remove meta from testCase schema * chore: update validation for testCases * fix(ui): show correct error message when expired * fix(collaboration-service): enable awareness cursors * nit(question-service): make testcode and input required * fix(communication-service): remove unused reference variable * chore: refactor code to follow repository pattern * chore: update github actions * fix: templateCode and solutionCode is now required * feat(communication-service): add expanding chat bot * wip: fancier code highlighting in chat * feat(communication-service): add code block formatting * feat(communication-service): add more qol * feat: updated ai service backend Renamed ai-chat-service to gen-ai-service Added two new endpoints: - Endpoint for analysis of failed test cases - Endpoint for analysis of error logs Also added chat session management with in-memory storage for user-specific sessions using API key and room ID. Now, each session for each user will have a newly instantiated chatSession, so the history will only contain chats within that session. This ensures that the responses are not affected by previous chat history that may be unrelated, which was the case previously as only one chat session is ever instantiated. Frontend is also to now pass the google AI api key to backend when making requests, instead of relying on the API key in the .env file * feat: integration of analysis endpoints * chore: change ai-chat-service name and update ci * chore: disable user service test * chore: fix ci * bug: change name of AI service * chore: update generic ci * chore: add service.js * chore: fix ci environments * feat: Add matching svc authentication * fix: periodically remove inactive chat sessions * feat(communication-service): enable room id based calling * nit(communication-service): change event name to match convention * chore: authentication needed for get question(s) * fix: Refactor matching service authentication * chore: Add nginx config for tracking * ui(user-service): add change password (stub) * chore: fix deploy scripts * chore: update ci * bug: remove -b flag * chore: remove frontend container from docker compose * nit(ui): change some text * wip: gen ai service * chore: remove unused page * nit: change topic to category * fix: introduce create-session endpoint * chore: update ci and remove aws files * chore: fix ci pipeline * fix: ensure all endpoints integrated well with error handling * fix: check if api key has been sent already on page load * chore: delete attempt function * fix: display question description html * nit: update start script to use new AI service name * nit: rename to useAi for consistency sake * fix: rename to gen-ai-service * nit: fix to useAi * wip * feat(user-service): integrate refresh token with frontend * fix: enable env * chore: cleanup yaml * Squashed commit of the following: commit 7f80345 Author: hollag <marcussoh38@gmail.com> Date: Wed Nov 13 12:02:48 2024 +0800 chore: update token expiry commit c3c9f14 Author: hollag <marcussoh38@gmail.com> Date: Wed Nov 13 11:51:46 2024 +0800 wip * chore: Update Collaboration Service with JWT Authorization (#115) * feat: add token verification * chore: update auth * bug: update auth middleware * chore: add some comments to explain why editing isn't needed --------- Co-authored-by: hollag <marcussoh38@gmail.com> * ui: cleaned up mobile navbar * fix: ai assist buttons loading ui * chore(gen-ai-service): refactor code * fix: set code editor to dark mode * nit: cleanup dark mode * chore: update test cases * chore: update ci env variable * chore: add error message when user tries to navigate * chore: delete unused Dockerfile * fix: #122, #123 * fix: #124 by removing repeated requests * fix: #125 * feat: change password page * fix: issues with positioning * fix: gen ai service edge cases * fix: include in previous commit * chore: update ci to update correct env file * chore: add continue on error for docker builds * fix: video call stuff * wip: video call * fix: disable test case running for database questions * chore: unblock deployment * bug: fix bug with rendering = signs * fix: run test case when end session * chore: remove 403 errors * fix: edit redis expiry and checking token * Push changes to Staging In Preparation for Final Submission (#110) * chore: remove test page * chore: add communication service to start script * fix: update to correct question service localhost link * chore: update scripts * feat(history-service)!: change attempt schema * fix: mute local * fix: video getting hidden when chat minimized * chore: add cors middleware * fix: minor bugs * chore: update dockerfile to add communication service * wip: add console log * fix: hardcoded socket * fix: matching service get question before delete user * wip: add console log * feat: set up ai-chat-service backend * feat: ai-chat-service frontend component (wip) * chore: Add userId to tokens * chore: add Dockerfile * feat(history-service)!: change endpoints * chore: remove debugging statements * chore: restore user service * wip: reduce bundle size * fix: pin tabler-icons * nit: add loading to button when searching * fix: showing numbers instead of categories in search page * nit: make session full width * feat: add notifications on leave/rejoin * feat: draggable video chat window * chore: fix bugs with collab service * feat(run-service)!: implement sse for 2 users * chore: delete from redis * fix: add ability to use ws for vps * test: add test cases and fixed bugs * test: add test cases * fix: add language selector to switch languages for syntax highlighting * test * chore: cleanup console.log * nit: remove console.log * chore: modify test to test edge cases * fix: no testcase found error * chore: disable tests for some services * chore: add builds for new services and frontend * fix: modify response to include questionId * chore: hide private testcases outputs * nit: change to use personal TURN server * chore: modify response format * feat: add back stun server * fix: removed function wrongly while resolving merge conflicts * feat(run-service)!: change status to statusCode * chore: check code attempt in test * feat: run test case (send to server only) * chore: modify cors * feat: execution with loading * fix: history service url for useApi * fix: accidentally removed mongoose import while fixing merge conflicts * feat: session summary page * feat: display past attempts on dashboard (wip) * feat: test case results * feat: add old code submission entry * chore: add error handling when one client disconnects * chore: create test for disconnect * fix: add event for start of execution * wip * nit: fix error message * feat: enable parallel processing * fix: fix executing question after both clients connects error * chore: update ci and docker compose * wip: first working version of peerjs * fix: attempt details displayed on attempt card * fix: collaborator details for attempt card and session summary page * chore: delete kubernetes files * fix: history service merge conflict issues * fix: add statusCode 204 * fix: 204 statusCode in filtered question * feat: final working version * fix: add userId to accessToken * fix: correct error message * fix: id in accessToken * wip: debug * fix: different channelId issue * wip: update FE to start supporting integrations * fix: add statusCode 204 (#108) * fix: add statusCode 204 * fix: 204 statusCode in filtered question * fix: add userId to accessToken * fix: correct error message * fix: id in accessToken * chore: update docker files * chore: add dockerignore file * feat: highlight Gemini * fix: add input for questions * fix: add type * wip: query and display ai response * feat: prettify integrations * fix: ensure code editor language correspond to selected language * feat: add loading preventers * chore: dockerise ai chat service * chore: add dockerignore file * fix: run service cannot double execute, cannot refresh * wip: attempt to fix video call not ending * feat: update code viewer * fix: working history * nit: update access token to expire in 1d * fix: revert attempt to close camera * fix: dom ready * nit: enable long polling * chore: update CI * chore: update run scripts for development * feat(run-service): disable block when one user not connected to execute test case extend timeout on frontend to 20 seconds * feat(communication-service): add tooltip for indicating possiblility of changing message target, change style of changing message target * feat(communication-service): add notifications for call incoming call incoming icon now vibrates changed call icon from a video camera to a normal phone * chore: update collab * feat(collaboration-service): fix notification on one user leave fix test case cannot be submitted when one user leave add information that room will be deleted if two people leave * nit(ui): change buttons to be light variant by default * fix(matching-service): fix timer not getting deleted * nit(ui): add loading state for history * chore(communication-service): clean up unused functions * fix(collaboration-service): change to params instead of query * chore: update test code * chore: remove /filter endpoint * chore: remove file * chore: change categoriesId to enum * chore: remove meta from testCase schema * chore: update validation for testCases * fix(ui): show correct error message when expired * fix(collaboration-service): enable awareness cursors * nit(question-service): make testcode and input required * fix(communication-service): remove unused reference variable * chore: refactor code to follow repository pattern * chore: update github actions * fix: templateCode and solutionCode is now required * feat(communication-service): add expanding chat bot * wip: fancier code highlighting in chat * feat(communication-service): add code block formatting * feat(communication-service): add more qol * feat: updated ai service backend Renamed ai-chat-service to gen-ai-service Added two new endpoints: - Endpoint for analysis of failed test cases - Endpoint for analysis of error logs Also added chat session management with in-memory storage for user-specific sessions using API key and room ID. Now, each session for each user will have a newly instantiated chatSession, so the history will only contain chats within that session. This ensures that the responses are not affected by previous chat history that may be unrelated, which was the case previously as only one chat session is ever instantiated. Frontend is also to now pass the google AI api key to backend when making requests, instead of relying on the API key in the .env file * feat: integration of analysis endpoints * chore: change ai-chat-service name and update ci * chore: disable user service test * chore: fix ci * bug: change name of AI service * chore: update generic ci * chore: add service.js * chore: fix ci environments * feat: Add matching svc authentication * fix: periodically remove inactive chat sessions * feat(communication-service): enable room id based calling * nit(communication-service): change event name to match convention * chore: authentication needed for get question(s) * fix: Refactor matching service authentication * chore: Add nginx config for tracking * ui(user-service): add change password (stub) * chore: fix deploy scripts * chore: update ci * bug: remove -b flag * chore: remove frontend container from docker compose * nit(ui): change some text * wip: gen ai service * chore: remove unused page * nit: change topic to category * fix: introduce create-session endpoint * chore: update ci and remove aws files * chore: fix ci pipeline * fix: ensure all endpoints integrated well with error handling * fix: check if api key has been sent already on page load * chore: delete attempt function * fix: display question description html * nit: update start script to use new AI service name * nit: rename to useAi for consistency sake * fix: rename to gen-ai-service * nit: fix to useAi * wip * feat(user-service): integrate refresh token with frontend * fix: enable env * chore: cleanup yaml * Squashed commit of the following: commit 7f80345 Author: hollag <marcussoh38@gmail.com> Date: Wed Nov 13 12:02:48 2024 +0800 chore: update token expiry commit c3c9f14 Author: hollag <marcussoh38@gmail.com> Date: Wed Nov 13 11:51:46 2024 +0800 wip * chore: Update Collaboration Service with JWT Authorization (#115) * feat: add token verification * chore: update auth * bug: update auth middleware * chore: add some comments to explain why editing isn't needed --------- Co-authored-by: hollag <marcussoh38@gmail.com> * ui: cleaned up mobile navbar * fix: ai assist buttons loading ui * chore(gen-ai-service): refactor code * fix: set code editor to dark mode * nit: cleanup dark mode * chore: update test cases * chore: update ci env variable * chore: add error message when user tries to navigate * chore: delete unused Dockerfile * fix: #122, #123 * fix: #124 by removing repeated requests * fix: #125 * feat: change password page * fix: issues with positioning * fix: gen ai service edge cases * fix: include in previous commit * chore: update ci to update correct env file * chore: add continue on error for docker builds * fix: video call stuff * wip: video call * fix: disable test case running for database questions * chore: unblock deployment * bug: fix bug with rendering = signs * fix: run test case when end session * chore: remove 403 errors * fix: edit redis expiry and checking token --------- Co-authored-by: hollag <marcussoh38@gmail.com> Co-authored-by: Lim Pei En <111886863+peienlim@users.noreply.github.com> Co-authored-by: elaineshijie <lohelaineshijie.183@gmail.com> Co-authored-by: pzl111 <phuazailian@gmail.com> Co-authored-by: Marcus Soh <31369072+HollaG@users.noreply.github.com> Co-authored-by: elaineshijie <122242919+elaineshijie@users.noreply.github.com> Co-authored-by: pzl111 <67725787+pzl111@users.noreply.github.com> * fix: attempt test program not showing due to bug * fix: format code * fix: incorrect input * fix: ai chat * fix: wrong highlight --------- Co-authored-by: hollag <marcussoh38@gmail.com> Co-authored-by: Lim Pei En <111886863+peienlim@users.noreply.github.com> Co-authored-by: pzl111 <phuazailian@gmail.com> Co-authored-by: elaineshijie <lohelaineshijie.183@gmail.com> Co-authored-by: Marcus Soh <31369072+HollaG@users.noreply.github.com> Co-authored-by: elaineshijie <122242919+elaineshijie@users.noreply.github.com> Co-authored-by: pzl111 <67725787+pzl111@users.noreply.github.com>
👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to
main
since the assignment started. Your teacher can see this too.Notes for teachers
Use this PR to leave feedback. Here are some tips:
main
since the assignment started. To leave comments on specific lines of code, put your cursor over a line of code and click the blue + (plus sign). To learn more about comments, read “Commenting on a pull request”.main
. Click a commit to see specific changes.For more information about this pull request, read “Leaving assignment feedback in GitHub”.
Subscribed: @asdfghjkxd @elaineshijie @pzl111 @peienlim @HmuuMyatMoe @HollaG