TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.82k stars 397 forks source link

Certificate file named 'cert.pfx' deleted on 'Save Settings' #909

Closed labodj closed 1 week ago

labodj commented 2 months ago

Description: When running the Technitium software in a Docker container on ARMv8 architecture on Linux, adding a root certificate file to the base path /etc/dns/ named 'cert.pfx' results in the file being automatically deleted when clicking "Save Settings" under 'Settings - Optional Protocols'. However, the file is retained if renamed to something other than 'cert.pfx', for example, 'certificate.pfx'.

Environment: Software Version: 12.1 Operating System: Manjaro Linux (ARMv8) Docker Version: 26.0.2

Steps to Reproduce: Run Technitium software in a Docker container on ARMv8 architecture. Create a file named cert.pfx under the directory mounted on /etc/dns (eg: touch /home/user/docker/technitium-dns/cert.pfx) Access the webinterface. Navigate to 'Settings - Optional Protocols'. Click "Save Settings". Observe that the 'cert.pfx' file is automatically deleted.

Expected Behavior: The software should allow the addition and retention of a certificate file named 'cert.pfx' when saved in the 'Settings - Optional Protocols' section.

Actual Behavior: The 'cert.pfx' file is automatically deleted upon clicking "Save Settings".

Workaround: Rename the 'cert.pfx' file to something other than 'cert.pfx', for example, 'certificate.pfx', and then save the settings.

ShreyasZare commented 2 months ago

Thanks for the post. The reason for this issue is that the self signed cert feature uses cert.pfx to store the self signed cert. And when the option for self signed cert is disabled, the file is deleted.

Will get to use a different file name for the self signed cert to make it clear so that it avoids such issues.

ShreyasZare commented 1 week ago

Technitium DNS Server v12.2.1 is now available that fixes this issue by using a more specific name for the self signed cert file. Do update and let me know your feedback.