Montag, 28. Juli 2003

Confusticated apache
I'm not sure if you'll see it but I wanted to say Thank You to all those who responded to my question about Apache security for a specific GET request and also to ScottJ for putting the word out.

In the end I capitulated and modified the CGI.  I appreciate learning about the mod_rewrite approach.  It's neat and would definitely have worked... if this copy of Apache had mod_rewrite installed.  Which it doesn't.   It's on an old RH7 box, there is no source available.  It's brittle.  Bleuch!

On balance of pain, and as much as I didn't want to, modifying the CGI made more more sense.

Thanks anyway though.

[Curiouser and curiouser!]
8:18:01 PM     comment []   [Macro error: Can't evaluate the expression because the name "trackbackLink" hasn't been defined.]   
 


Comment Authentication Prototype.

I've built a prototype of the comment signature system discussed earlier. The prototype consists of an authentication server which anyone can register with and support on this blog for verifying signatures. So far it seems to work.

To gain the ability to sign comments:

  1. Add the following HTML to the head section of your homepage/weblog: <link rel="sigserver" href="http://simon.incutio.com/auth/confirm" />
  2. Create a comment authorisation account.
  3. Log in to your authorisation account and add the bookmarklet it provides you with to your browser.
  4. You can now sign a comment on this site (and any others that support the prototype) using the bookmarklet. You must activate it while looking at the entry page containing the 'Add Comment' form. The site will do the rest. Note that the bookmarklet will fill in the name, email and url fields on the form, saving you the hassle.

To add support for comment authentication to your own blog (assuming it uses PHP):

  1. Grab this file: sig-confirm.inc.php. It contains a function which can be used to confirm a signature. It requires IXR, which you can download from here.
  2. Make some minor modifications to your 'add comment' form, to make it compatible with the bookmarklet. You need to assign ID attributes to the input fields for name, email and URL of 'commentFormName', 'commentFormEmail' and 'commentFormURL' respectively. You also need to add a hidden field like this one: <input type="hidden" name="signature" id="commentSignature" value="" />
  3. Modify the code that processes the add comment form. If 'signature' is not an empty string, the comment has been signed so confirm the signature by calling the confirmSig() function (documentation of the arguments is included in the sig-confirm.inc.php file). If the function returns true, flag the comment as signed. I suggest doing this by saving the signature variable along with the rest of the comment.
  4. When displaying comments, be sure to visually indicate comments that are "signed".

The system is decentralised, so if you want to host your own authentication server rather than relying on mine feel free to grab the PHP code (warning: it's a bit of a mess) and use it as a starting point.

This is more of a proof of concept than anything else, so feedback and suggestions would be very welcome.

Incidentally, this isn't the first time this problem has been tackled. See here and here for details of a system that uses PGP to sign and verify comments.

[Blogging]
8:15:27 PM     comment []   [Macro error: Can't evaluate the expression because the name "trackbackLink" hasn't been defined.]   
 


More Code for Pythonistas. "i love rss" Stupid Element Tricks, Part 2. »The RSSWrapper class from the last article supports RSS 0.9x and 2.0 feeds. There's also a third RSS format, RSS 1.0, which is based on RDF, and stores the channel and item information in a slightly different fashion.« [Der Schockwellenreiter]
8:14:24 PM     comment []   [Macro error: Can't evaluate the expression because the name "trackbackLink" hasn't been defined.]