Skip to content
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

add: article search get method #4

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

yhdev7935
Copy link
Member

No description provided.

@yhdev7935 yhdev7935 requested review from ty-kmu and c0510gy May 7, 2023 01:26
);

const offset = (page - 1) * resultsPerPage;
const query = `SELECT * FROM ARTICLE WHERE ${req.query.type} LIKE '%${req.query.value}%' LIMIT ${resultsPerPage} OFFSET ${offset}`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

SQL 인젝션 방지를 위해 escape또는 prepared statement 적용

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

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.

2 participants