Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
I
ISPConfig 3
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 485
    • Issues 485
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 23
    • Merge Requests 23
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #5359

Closed
Open
Opened Aug 02, 2019 by hkendusers@hkendusers

invalid HTML when create new DNS SPF & DMARC record

short description

When I create a new DNS SPF or DMARC record, there is "/>" next to the "Active" checkbox, after checking the HTML, it is: <input type="checkbox" value="1" id="active" name="active" <input=""> /> But no such problem when edit existing SPF or DMARC record.

correct behaviour

<input type="checkbox" value="1" id="active" name="active" checked="">

environment

Server OS: CentOS Server OS version: 7.3.1611 ISPConfig version: 3.1.14p2

proposed fix

Pre-defined to check checkboxes at the beginning of function onShowEnd() in /usr/local/ispconfig/interface/web/dns/dns_spf_edit.php

	function onShowEnd() {
		global $app, $conf;

		$zone = $app->functions->intval($_GET['zone']);

		// pre-defined to check checkboxes
		$app->tpl->setVar("active", "CHECKED");
		$app->tpl->setVar("spf_a_active", "CHECKED");
		$app->tpl->setVar("spf_mx_active", "CHECKED");

		//* check for an existing spf-record
		$sql = "SELECT data, active FROM dns_rr WHERE data LIKE 'v=spf1%' AND zone = ? AND " . $app->tform->getAuthSQL('r');
		$rec = $app->db->queryOneRecord($sql, $zone);
		if ( isset($rec) && !empty($rec) ) {

screenshots

screenshot.1515

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ispconfig/ispconfig3#5359