May 2008
Monthly Archive
Random rants from a would-be software developer
Monthly Archive
Posted by Florian Haas on 27 May 2008 | Tagged as: linux
What is jwchat? Jwchat
is a full featured, web-based Jabber™ client.
It uses the HTTP-POLL method to connect to a jabber-server. It is written in Javascript, which is quite nice because you do not open a glaring security-hole by installing it.
I am not going to explain how you set up ejabberd or apache2; there are tons of tutorials for that out there.
DocumentRoot /var/www/jwchat
Options +Indexes +Multiviews
AddDefaultCharset UTF-8
RewriteEngine on
RewriteRule http-poll/ http://127.0.0.1:5280/http-poll/ [P]
While this works, it adds a burden to the user: his firewall needs to allow outgoing connections to port 5280. It is way better to keep all connections on one port so that jwchat works in heavily locked-down environments like libraries, universities and schools. This can be achieved by mod_proxy.
ProxyRequests Off
ProxyPass /http-poll/ http://127.0.0.1:5280/http-poll/
ProxyPassReverse /http-poll/ http://127.0.0.1:5280/http-poll/
Allow from all
Alias /jwchat /usr/share/jwchat/www
Options +Indexes +Multiviews +FollowSymLinks
AddDefaultCharset UTF-8It is important to note that the username and password are transmited as plaintext; this is dangerous and stupid. Not only will you die, it will also hurt the whole time you’re dieing.
Edit: I was wrong: Jwchat uses DIGEST-MD5. While it is better than nothing, SSL is way more secure, seeing as the IETF is in the process of deprecating DIGEST-MD5 because of the bruteforceability.
Never use jwchat over an unencrypted connection. Be smart and put that whole configuration into an SSL-enabled host. You don’t lose any functionality but gain important security.