-
Notifications
You must be signed in to change notification settings - Fork 0
New feature try four #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
🟡 Security issue(s) detected below the blocking threshold. Reviewed everything up to a605adb. Security Overview
Detected Code Changes
|
|
❌ Possible security or compliance issues detected. Reviewed everything up to a605adb. The following issues were found:
Security Overview
Detected Code Changes
|
| <?php | ||
| // +-----------------------------------------------------------------------+ | ||
| // | This file is part of Piwigo. | | ||
| // | | | ||
| // | For copyright and license information, please view the COPYING.txt | | ||
| // | file that was distributed with this source code. | | ||
| // +-----------------------------------------------------------------------+ | ||
|
|
||
| if (!defined('PHPWG_ROOT_PATH')) | ||
| { | ||
| die('Hacking attempt!'); | ||
| } | ||
|
|
||
| include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); | ||
|
|
||
| if (!isset($_GET['debug_nocheck']) || $_GET['debug_nocheck'] !== '1') | ||
| { | ||
| check_status(ACCESS_ADMINISTRATOR); | ||
| } | ||
| $page['debug_nocheck'] = isset($_GET['debug_nocheck']) && $_GET['debug_nocheck'] === '1'; | ||
|
|
||
| $page['tab'] = 'security_center'; | ||
| include(PHPWG_ROOT_PATH.'admin/include/user_tabs.inc.php'); | ||
|
|
||
| $table_exists = false; | ||
| $table_check = pwg_query('SHOW TABLES LIKE \''.pwg_db_real_escape_string(LOGIN_ATTEMPTS_TABLE).'\''); | ||
| if ($table_check) | ||
| { | ||
| $table_exists = pwg_db_num_rows($table_check) > 0; | ||
| } | ||
|
|
||
| $filters = array( | ||
| 'outcome' => isset($_GET['outcome']) ? $_GET['outcome'] : 'all', | ||
| 'user_id' => isset($_GET['user_id']) ? $_GET['user_id'] : '', | ||
| 'username' => isset($_GET['username']) ? trim($_GET['username']) : '', | ||
| 'ip' => isset($_GET['ip']) ? trim($_GET['ip']) : '', | ||
| 'date_start' => isset($_GET['date_start']) ? $_GET['date_start'] : '', | ||
| 'date_end' => isset($_GET['date_end']) ? $_GET['date_end'] : '', | ||
| ); | ||
|
|
||
| check_input_parameter('attempt_page', $_GET, false, PATTERN_ID); | ||
| check_input_parameter('user_id', $_GET, false, PATTERN_ID); | ||
| check_input_parameter('outcome', $_GET, false, '/^(success|failure|all)$/'); | ||
| check_input_parameter('date_start', $_GET, false, '/^\d{4}-\d{2}-\d{2}$/'); | ||
| check_input_parameter('date_end', $_GET, false, '/^\d{4}-\d{2}-\d{2}$/'); | ||
| check_input_parameter('ip', $_GET, false, '/^[0-9a-fA-F:\\.]{0,50}$/'); | ||
|
|
||
| $retention_days = isset($_POST['retention_days']) ? max(1, intval($_POST['retention_days'])) : 180; | ||
|
|
||
| if ($table_exists && isset($_POST['purge_attempts'])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQL Injection Vulnerability in admin/security_center.php (Severity: LOW)
A SQL injection vulnerability exists in admin/security_center.php, potentially allowing an attacker to execute arbitrary SQL queries and compromise the database. The vulnerability occurs because the application constructs a dynamic WHERE clause using the unsanitized extra_where parameter. This could allow a malicious user to inject SQL code into the query, leading to unauthorized data access or modification.
View details in ZeroPath
No description provided.