Jump to content
Froxlor Forum
  • 0

Fehler beim Löschen von DNS-records seit 0.10.38.3


Question

Posted

Ich habe gerade festgestellt, dass das Löschen eines DNS-records (hier TXT) zu folgendem Fehler führt "Domain nicht gefunden oder keine Berechtigung".

Da ich für die selbe Domain aber weitere records anlegen kann, vermute ich, führt die Meldung in die Irre. Das apache2 error log gibt nichts her.

Wie können wir dem auf den Grund gehen?

4 answers to this question

Recommended Posts

  • 1
Posted

Hiermit sollte es wieder gehen:

 

diff --git a/dns_editor.php b/dns_editor.php
index 293502cb..da10f5cd 100644
--- a/dns_editor.php
+++ b/dns_editor.php
@@ -24,7 +24,7 @@ use Froxlor\Api\Commands\DomainZones as DomainZones;
 // This file is being included in admin_domains and customer_domains
 // and therefore does not need to require lib/init.php
 
-$domain_id = isset($_GET['domain_id']) ? (int) $_GET['domain_id'] : null;
+$domain_id = isset($_GET['domain_id']) ? (int) $_GET['domain_id'] : (isset($_POST['domain_id']) ? (int)$_POST['domain_id'] : null);
 
 $record = isset($_POST['record']['record']) ? trim($_POST['record']['record']) : null;
 $type = isset($_POST['record']['type']) ? $_POST['record']['type'] : 'A';
@@ -56,12 +56,11 @@ if ($action == 'add_record' && ! empty($_POST)) {
        }
 } elseif ($action == 'delete') {
        // remove entry
-       $entry_id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
-       if ($entry_id > 0) {
+       if ($id > 0) {
                if (isset($_POST['send']) && $_POST['send'] == 'send') {
                        try {
                                DomainZones::getLocal($userinfo, array(
-                                       'entry_id' => $entry_id,
+                                       'entry_id' => $id,
                                        'id' => $domain_id
                                ))->delete();
                                // success message (inline)
@@ -73,7 +72,8 @@ if ($action == 'add_record' && ! empty($_POST)) {
                        \Froxlor\UI\HTML::askYesNo('dnsentry_reallydelete', $filename, array(
                                'page' => $page,
                                'action' => $action,
-                               'id' => $id
+                               'id' => $id,
+                               'domain_id' => $domain_id
                        ), $id);
                }
        }

 

  • 0
Posted
On 12/7/2022 at 1:50 PM, d00p said:

Hiermit sollte es wieder gehen:

 

 

Nachdem mir das auch gerade auf die Füße gefallen ist wollte ich nur kurz danke sagen!

Spitzen Support seit Jahren.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...