[Pdns-users] PDNS + MySQL results not un-escaped?
norbert at linuxnetworks.de
Wed Jan 6 08:56:08 UTC 2010
> 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
OpenPGP public key
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part.
More information about the Pdns-users