Merge pull request #687 from wrongecho/fix-leftover-vulnerable-code

Remove leftover SQL-injection vulnerable code
This commit is contained in:
wrongecho 2023-05-20 15:36:03 +01:00 committed by GitHub
commit c63b965807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 8 deletions

View File

@ -1,14 +1,11 @@
<?php
<?php
// Default Column Sort by Filter
$sb = "document_name";
$o = "ASC";
require_once("inc_all_client.php");
// Sort by
if (!empty($_GET['sb'])) {
$sb = sanitizeInput($_GET['sb']);
} else {
$sb = "document_name";
}
// Search query SQL snippet
if (!empty($q)) {
$query_snippet = "AND (MATCH(document_content_raw) AGAINST ('$q') OR document_name LIKE '%$q%')";