[Pdns-users] returning a TXT record consisting only of digits from lua backend
Peter van Dijk
peter.van.dijk at powerdns.com
Wed Aug 18 13:40:57 UTC 2021
Hi Christof,
On Sun, 2021-08-01 at 21:49 +0200, Christof Meerwald via Pdns-users
wrote:
> Sorry, when saying lua backend I actually mean lua2backend:
>
> pdns-backend-lua2 4.5.1-1pdns.focal
>
>
> > Better yet, can you show some config and code?
>
> I was basically just testing my Let's Encrypt ACME-DNS verification:
>
> https://svn.cmeerw.net/src/pdns-acme-backend/trunk/acmebackend.lua
>
> which should just return the contents of a file as the TXT record.
>
> Unfortunately, I was testing with a file containg "1234" - this didn't
> work, but when changing the file contents to something like "A1234"
> it suddenly started working.
I can confirm this is due to how lua_isnumber works. Perhaps you can
file a ticket so we can see if we can do something smarter there.
Changing line 11 (by my count) to
data[#data + 1] = '"' .. l .. '"'
makes your code work for me.
Kind regards,
--
Peter van Dijk
PowerDNS.COM BV - https://www.powerdns.com/
More information about the Pdns-users
mailing list