mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-03 16:21:50 +02:00
Small security fixes, not urgent
This commit is contained in:
parent
d54c6f8f52
commit
0a0d30d5a0
5 changed files with 14 additions and 7 deletions
|
@ -77,8 +77,8 @@ function setupLogger($logFilePath, $channelName = 'app') {
|
|||
}
|
||||
|
||||
function isIpWhitelisted($ip, $pdo) {
|
||||
$stmt = $pdo->prepare("SELECT COUNT(*) FROM registrar_whitelist WHERE addr = ?");
|
||||
$stmt->execute([$ip]);
|
||||
$stmt = $pdo->prepare("SELECT COUNT(*) FROM registrar_whitelist WHERE addr = :ip");
|
||||
$stmt->execute(['ip' => $ip]);
|
||||
$count = $stmt->fetchColumn();
|
||||
return $count > 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue