usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.55k stars 602 forks source link

CyberPanel's scripted DNS entries are missing single quotes ('') causing unexpected behavior #555

Open patrickgarsow opened 3 years ago

patrickgarsow commented 3 years ago

CyberPanel is not entering PowerDNS entries correctly in that they are missing single quotes around the field entries. This causes pdnsutil to fail on reading the zone data properly.

pdnsutil edit-zone <Zone> Error: Parsing record content (try 'pdnsutil check-zone'): Data field in DNS should start with quote (") at position 0 of 'v=spf1 a mx ip4:<ipaddr> ~all'

jordanlambrecht commented 3 years ago

@patrickgarsow Do you know how to fix this? If so, want to create a PR?

meramsey commented 3 years ago

we would need steps to reproduce

I've not really used the DNS manager in Cyberpanel so not sure but my best guess from cursory glance at both DNSManager and other stuff is its in this file possibly around here. https://github.com/usmannasir/cyberpanel/blob/stable/plogical/dnsUtilities.py#L396-L408

Most likely these records may need some special escaping and docstring triple quotes is there's a mixture in the record.

Once we get more details and steps to reproduce we can dig into this deeper