-
Notifications
You must be signed in to change notification settings - Fork 31
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
Phpcs + PHPstan #184
Phpcs + PHPstan #184
Conversation
Are you sure |
Indeed, it was too simple :( |
inc/ticket.class.php
Outdated
} | ||
//groups | ||
$query_groups = "INSERT INTO glpi_groups_tickets | ||
if (!$res = $DB->doQuery($query_users)) { |
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.
It look like $tickets
is sent from the client, which mean this could become an SQL injection on GLPI 11 when autoescaping is removed.
We should either keep the deprecated query
call or not use a raw string query here.
inc/ticket.class.php
Outdated
Session::addMessageAfterRedirect(__('Error : adding actors (group)', "escalade"),false, ERROR); | ||
exit; | ||
} | ||
if (!$res = $DB->doQuery($query_groups)) { |
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.
Same here.
inc/ticket.class.php
Outdated
} | ||
|
||
static function filter_actors(array $params = []): array { | ||
if (! $res = $DB->doQuery($query_docs)) { |
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.
Same here.
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.
seems good (hard to read)
Add phpcs + phpstan