Skip to content

Fix for adding groups to users at registration (Wipro / Topgear)#28

Merged
jmgasper merged 2 commits intomasterfrom
develop
Feb 5, 2026
Merged

Fix for adding groups to users at registration (Wipro / Topgear)#28
jmgasper merged 2 commits intomasterfrom
develop

Conversation

@jmgasper
Copy link
Contributor

@jmgasper jmgasper commented Feb 5, 2026

@jmgasper jmgasper merged commit 9ce723c into master Feb 5, 2026
6 checks passed
const memberId = String(userId);
const createdBy = String(Constants.DEFAULT_CREATE_USER_ID);
const membershipType = Constants.memberGroupMembershipName;
const affected = await this.groupPrismaClient.$executeRaw`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
Using raw SQL queries with $executeRaw can expose the application to SQL injection attacks if not handled carefully. Ensure that all inputs are properly sanitized and consider using parameterized queries or ORM methods to mitigate this risk.

}

try {
if (this.isUuid(idValue)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
The resolveGroupId method uses raw SQL queries with $queryRaw. Ensure that inputs are properly sanitized to prevent SQL injection vulnerabilities. Consider using parameterized queries or ORM methods.

}

try {
const byDescription = await this.groupPrismaClient.$queryRaw<
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
The findGroupIdByDescriptionOrName method uses raw SQL queries with $queryRaw. Ensure that inputs are properly sanitized to prevent SQL injection vulnerabilities. Consider using parameterized queries or ORM methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant