We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 3fb2c06c authored by Joshua Wise's avatar Joshua Wise Committed by Evan Prodromou

Potential SQL injection in Local_group::setNickname()

This change escapes a parameter in Local_group::setNickname(). Review
of the code paths that call this function sanitize the parameter
higher up the stack, but it's escaped here to prevent mistakes later.

Note that nickname parameters are normally alphanum strings, so
there's not much danger in double-escaping them.
parent 4092ee1b
......@@ -44,7 +44,7 @@ class Local_group extends Managed_DataObject
function setNickname($nickname)
$qry = 'UPDATE local_group set nickname = "'.$nickname.'" where group_id = ' . $this->group_id;
$qry = 'UPDATE local_group set nickname = "'.$this->escape($nickname).'" where group_id = ' . $this->group_id;
$result = $this->query($qry);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment