Skip to content

Commit

Permalink
temp SQL injection patch
Browse files Browse the repository at this point in the history
  • Loading branch information
abhidas03 committed Apr 29, 2024
1 parent cb7fc93 commit 3491305
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/pagebody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,11 @@ async function filterData(searchParams: { query?: string; filters?: string }) {
})
.join(") AND (");
}


filterString.replace(/\W/g, '')
const query = `SELECT FIRST_NAME, LAST_NAME, GRAD_YEAR, DORM, DORM_ROOM, \
USER_ID FROM student_data WHERE (${filterString}) `;
USER_ID FROM student_data WHERE (${filterString})`;


// @ts-ignore
const raw: any[] = await queryDb(query);
Expand Down

0 comments on commit 3491305

Please sign in to comment.