[Pdns-users] PDNS + MySQL results not un-escaped?
Norbert Sendetzky
norbert at linuxnetworks.de
Wed Jan 6 08:56:08 UTC 2010
Hi Michael
> When I enter a DKIM or Domain Keys record, which requires use of ';', the
> records on the secondary name server have this character escaped with '\',
> as to be expected.
>
> As this character has a special meaning in MySQL I would think the simple
> answer would be to unescape it prior to returning the RR.
This is a common misunderstanding of web developers that escaping in MySQL is
done by adding backslashes. Instead, escaping is done by calling
mysql_real_escape(), which prepares the string to be save when storing it to
the database but when fetching the string again, it will be the same as before
calling mysql_real_escape(). Therefore, if a web application adds backslashes
it corrupts the record and this has to be considered as bug of the web
application.
Norbert
--
OpenPGP public key
http://www.linuxnetworks.de/norbert.pubkey.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20100106/9cd5f7c9/attachment-0001.sig>
More information about the Pdns-users
mailing list