mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-15 09:07:00 +02:00
EPP now follows the registrar whitelist
This commit is contained in:
parent
15618d44d3
commit
8ff945e475
2 changed files with 40 additions and 4 deletions
|
@ -428,4 +428,19 @@ function dnssec_key2ds($owner, $flags, $protocol, $algorithm, $publickey) {
|
|||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Function to update the permitted IPs from the database
|
||||
function updatePermittedIPs($pool, $permittedIPsTable) {
|
||||
$pdo = $pool->get();
|
||||
$query = "SELECT addr FROM registrar_whitelist";
|
||||
$stmt = $pdo->query($query);
|
||||
$permittedIPs = $stmt->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||
$pool->put($pdo);
|
||||
|
||||
// Clear the table and insert new values
|
||||
$permittedIPsTable->truncate();
|
||||
foreach ($permittedIPs as $ip) {
|
||||
$permittedIPsTable->set($ip, ['addr' => $ip]);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue