MyBB Community Forums

Full Version: Find Users should use `escape_string_like()`
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

$userfield_sql .= ' AND '.$db->escape_string($column)." LIKE '%".$db->escape_string($input)."%'";

should be

$userfield_sql .= ' AND '.$db->escape_string($column)." LIKE '%".$db->escape_string_like($input)."%'";


	 * Escape a string used within a like command.
	 * @param string The string to be escaped.
	 * @return string The escaped string.
	function escape_string_like($string)
		return $this->escape_string(str_replace(array('%', '_') , array('\\%' , '\\_') , $string));

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github:

Thanks for contributing to MyBB!

The MyBB Group