bug in web interface for bind package
-
This post is deleted! -
named.conf is rewritten from the xml file every time you save, so it should not be edited manually.
-
@johnpoz very odd, I removed the entries, checked named.conf was ok. Retyped everything, and my ^M are back.
-
@aligator638 said in bug in web interface for bind package:
@johnpoz very odd, I removed the entries, checked named.conf was ok. Retyped everything, and my ^M are back.
In my previous post, I was talking about typing in any text input box in the pfSense GUI, not editing a file directly on the system. So if you are "pasting" something into a text box in the GUI, and that pasted text contains Windows or DOS line ending sequences, this ^M problem will show up.
So when you say "typed", do you mean only typing from the keyboard, or are you perhaps pasting in something from elsewhere into the GUI text box? I'm not a user of
bind
on pfSense, but I assume it has a place for the user to manually enter certain things into the configuration by typing or pasting text into one or more text boxes or text input areas in the GUI screens. If Windows or DOS line endings get copied into those GUI text boxes, they will get saved into the XML and then subsequently written out to thenamed.conf
or any other file generated at runtime by the pfSense system.How do I know this can happen? Because I fought it for some time in the code I wrote for the Snort and Suricata packages.
-
@bmeeks sorry, I re-TYPED everything, not cut and paste. And as explained in previous posts, this happens in all the custom fields in this package.
-
Checked the main xml file and decoded the saved text (it is base64)
cmVjdXJzaW9uIG5vOw0KYWxsb3ctdHJhbnNmZXIgeyBub25lOyB9Ow0KYmluZGtleXMtZmlsZSAiL2V0Yy9uYW1lZC9iaW5kLmtleXMiOw==
==>>
recursion no;
allow-transfer { none; };
bindkeys-file "/etc/named/bind.keys";No ^M characters in the xml file. So these characters are added when the data is saved into named.conf
-
Hello!
What are you using to view the named.conf after adding custom options with the web gui? e.g. "ssh in with putty on windows and cat the named.conf" , or "Diagnostics -> Edit File in the gui", etc...
John
-
@serbus very interesting comment John, in vi (ssh), I can see the ^M, but not with the GUI editor, just to check I selected into the editor, and copied that data back into vi again, no ^M
-
This post is deleted! -
This post is deleted!