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

There might be a SQL inject issus in \admin\deleteCategorie.php #1

Closed
FStac opened this Issue Jan 1, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@FStac
Copy link

FStac commented Jan 1, 2019

issus start at line 7 to line 10
if(isset($_POST["submit"])) { $DeleteFromURL = $_GET["delete"]; $Query = "DELETE FROM category WHERE id='$DeleteFromURL'"; $Execute = mysqli_query($Connection, $Query);
We can see intuitively that database queries are not filtered,so attacker can inject payload into Query directly
SUGGEST:
i think you can add character filtering to check user input before execute the query

@Paroxyste

This comment has been minimized.

Copy link
Owner

Paroxyste commented Jan 2, 2019

Hello and thank you for bringing the problem to my attention.

Can you tell me if the problem is now solved? Sorry, I'm a beginner.

@FStac

This comment has been minimized.

Copy link

FStac commented Jan 2, 2019

i think you can set a syntax to check user input string dose contain special chars like (' , + '' or -) ,if it does,then split it out or give a error response directly.

@Paroxyste

This comment has been minimized.

Copy link
Owner

Paroxyste commented Jan 2, 2019

Thanks for your advice, I blocked the special characters of the inputs. If you have any other ideas, don't hesitate to tell me about them.

Please block your script, you're saturating my mailbox.
Sincerely.

@Paroxyste Paroxyste closed this Jan 2, 2019

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