Add CRUD endpoints for user profiles and patch critical dependency vulnerabilities #108
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.
Implements REST API for user profile management and updates vulnerable dependencies (body-parser, debug, ejs, morgan) to patched versions.
User Profile CRUD Endpoints
Added 5 REST endpoints at
/api/profiles:POST /- Create profile (requires username, email)GET /- List all profilesGET /:username- Get profile by usernamePUT /:username- Update profile (requires email)DELETE /:username- Delete profileImplementation:
model/user_profiles.js- Parameterized queries for CRUD operationsroutes/user_profiles.js- Express routes with authentication viacheck_loggedmodel/init_db.js- Createsuser_profilestable (username PK, email, full_name, bio, avatar_url)Security Fixes
Updated vulnerable dependencies:
body-parser: 1.13.2 → 1.20.3 (DoS via URL encoding)debug: 2.2.0 → 2.6.9 (ReDoS)ejs: 2.4.2 → 3.1.10 (template injection)morgan: 1.6.1 → 1.10.1 (code injection)Added npm overrides to force
ejs-localsto use patched ejs version. Reduced total vulnerabilities from 24 to 19.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.