[WIP] Fix and complete server-side JID validation and escaping.
Thanks a lo, I'll review it asap! You've added a dependency, is it OK regarding the packages (like the Debian one?).
Hi,
Thanks a lo, I'll review it asap! You've added a dependency, is it OK regarding the packages (like the Debian one?).
For Debian, I will of course take care of that. For everything else, it has to be - no JID validation is possible without that (except with copying the code, of course).
I updated a lot, please review again, @edhelas ☺!
As I'm not planning to maintain a specifical stringprep dependency from that I'm assuming that the only proper way to do so would be to directly call "idn" (http://www.gnu.org/software/libidn/manual/html_node/Invoking-idn.html) and call it from PHP. I'm already using it during the registration process (see https://api.movim.eu/accounts/register) and it has a complete Nodeprep implementation.
Let's see if I can revive this PR :)