bug 246 fixed : GET parameter "search" is not completely checked before
usage in SQL queries. Simple check : if a ";" if found, execution stops. git-svn-id: http://piwigo.org/svn/branches/branch-1_5@988 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
2268adf642
commit
7bdb132ffc
1 changed files with 6 additions and 0 deletions
|
@ -381,6 +381,12 @@ function initialize_category( $calling_page = 'category' )
|
||||||
// search result
|
// search result
|
||||||
if ( $page['cat'] == 'search' )
|
if ( $page['cat'] == 'search' )
|
||||||
{
|
{
|
||||||
|
// SQL injection hacking attempt?
|
||||||
|
if (strpos($_GET['search'], ';') !== false)
|
||||||
|
{
|
||||||
|
die('Hacking attempt on "search" GET parameter');
|
||||||
|
}
|
||||||
|
|
||||||
// analyze search string given in URL (created in search.php)
|
// analyze search string given in URL (created in search.php)
|
||||||
$tokens = explode('|', $_GET['search']);
|
$tokens = explode('|', $_GET['search']);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue