invalid HTML when create new DNS SPF & DMARC record

Discussion in 'General' started by hkendusers, Jul 9, 2019.

  1. hkendusers

    hkendusers New Member

    Hi all,

    When I create a new DNS SPF or DMARC record, there is "/>" next to the "Active" checkbox, after checking the HTML, it is:

    HTML:
    <input type="checkbox" value="1" id="active" name="active" <input="">
    />

    I found that the problem is:
    /usr/local/ispconfig/interface/web/dns/dns_spf_edit.php
    PHP:
    $sql "SELECT data, active FROM dns_rr WHERE data LIKE 'v=spf1%' AND zone = ? AND " $app->tform->getAuthSQL('r');
    /usr/local/ispconfig/interface/web/dns/dns_dmarc_edit.php
    PHP:
    $sql "SELECT data, active FROM dns_rr WHERE data LIKE 'v=DMARC1%' AND zone = ? AND name = ? AND " $app->tform->getAuthSQL('r');
    And then this condition always return false
    PHP:
    if ( isset($rec) && !empty($rec) )
    so that it cannot assign CHECKED or UNCHECKED.
    PHP:
    if ($rec['active'] == 'Y'$app->tpl->setVar("active""CHECKED"); else $app->tpl->setVar("active""UNCHECKED");

    If it assigns CHECKED or UNCHECKED at the beginning of function onShowEnd(), then problem solved, but I am not sure if it is good idea to do this.

    ISPConfig version: 3.1.14

    Please advice & fix.
     
  2. hkendusers

    hkendusers New Member

  3. till

    till Super Moderator Staff Member ISPConfig Developer

  4. hkendusers

    hkendusers New Member

Share This Page