This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 240
fix(sec): Fix SQL injection in dashboard #6250
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
leoncx
commented
Apr 27, 2018
- Fix some SQL Injections
sc979
approved these changes
Apr 30, 2018
@@ -3,34 +3,34 @@ | |||
* Copyright 2005-2016 Centreon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2018 ;)
kduret
suggested changes
Apr 30, 2018
@@ -61,9 +70,9 @@ | |||
|
|||
if ($accessHost) { | |||
$DBRESULT = $pearDBO->query( | |||
"SELECT * FROM `log_archive_host` WHERE host_id = " | |||
"SELECT * FROM `log_archive_host` WHERE host_id = '" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a good idea to update this query like that ? Because it's not working with mysql strict mode
@@ -61,8 +70,8 @@ | |||
if ($accessService) { | |||
$DBRESULT = $pearDBO->query( | |||
"SELECT * FROM `log_archive_service` WHERE host_id = '". | |||
$pearDBO->escape($_GET["host_id"])."' AND service_id = ". | |||
$pearDBO->escape($_GET["id"])." ORDER BY `date_start` DESC" | |||
$pearDBO->escape($_GET["host_id"])."' AND service_id = '". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a good idea to update this query like that ? Because it's not working with mysql strict mode
kduret
approved these changes
May 30, 2018
sc979
force-pushed
the
security-fix-reporting
branch
from
June 4, 2018 12:38
a35f9ff
to
f9e5737
Compare
* Fix some SQL Injections
* Use prepare statement on queries
sc979
force-pushed
the
security-fix-reporting
branch
from
June 8, 2018 10:03
f9e5737
to
d520475
Compare
kduret
pushed a commit
that referenced
this pull request
Jun 25, 2018
* fix(sec): Fix SQL injection in dashboard * Fix some SQL Injections * fix(sec): Change query method * Use prepare statement on queries
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.