[exim-dev] null char in string expansions

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Mike Cardwell
Date:  
À: exim-dev
Sujet: [exim-dev] null char in string expansions
Hi,

I was trying to generate unique IDs by taking a bunch of variables,
joining them together and creating an MD5 of the result. I used the null
character to separate the items before generating the MD5 which lead to
me accidently coming across this problem:

root@haven:~# exim4 -be '${md5:foo}'
acbd18db4cc2f85cedef654fccc4a4d8
root@haven:~# exim4 -be '${md5:foo\0bar}'
acbd18db4cc2f85cedef654fccc4a4d8
root@haven:~#

I'm assuming that's a bug? It doesn't just affect ${md5} ...

root@haven:~# exim4 -be '${substr_0_6:foo\0bar}'
foo
root@haven:~#

Should I bugzilla it?

--
Mike Cardwell - IT Consultant and LAMP developer
Cardwell IT Ltd. (UK Reg'd Company #06920226) http://cardwellit.com/
Technical Blog: https://secure.grepular.com/blog/