1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 16:44:17 +02:00
This commit is contained in:
Jakub Vrana
2017-02-19 14:32:01 +01:00
parent 9df33e82e6
commit 346353153d

View File

@@ -431,9 +431,9 @@ function create_routine($routine, $row) {
}
/** Remove current user definer from SQL command
* @param string
* @return string
*/
* @param string
* @return string
*/
function remove_definer($query) {
return preg_replace('~^([A-Z =]+) DEFINER=`' . preg_replace('~@(.*)~', '`@`(%|\\1)', logged_user()) . '`~', '\\1', $query); //! proper escaping of user
}