Archive for September, 2007

Akismet Sanitised

Sunday, September 30th, 2007

I made the Akismet plugin a little more sane after discovering it sent the entire $_SERVER array to akismets servers. I changed:

        $ignore = array( 'HTTP_COOKIE' );

        foreach ( $_SERVER as $key => $value )
                if ( !in_array( $key, $ignore ) )
                        $comment["$key"] = $value;

To:

        foreach ($_SERVER as $k => $v)
        {
                if (strpos($k, 'HTTP_') === 0 && $k != 'HTTP_COOKIE')
                {
                        $comment[$k] = $v;
                }
        }

Disabled Akismet, comments held for moderation.

Tuesday, September 25th, 2007

I have made the decision to disable Akismet, after reading some hype about the new Wordpress 2.3’s plugin version check API, which turned out to be negative but reveals something interesting with regards to Akismet. The following code is taken from the official Akismet plugin for Wordpres.

        $ignore = array( 'HTTP_COOKIE' );

        foreach ( $_SERVER as $key => $value )
                if ( !in_array( $key, $ignore ) )
                        $comment["$key"] = $value;

        $query_string = '';
        foreach ( $comment as $key => $data )
                $query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';

        $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);

The bit that worries me is the use of $_SERVER, the only item from this array not sent is HTTP_COOKIE, fair enough. But why do you need to know the full paths to the files on my server and other server environment variables Akismet? I do not have a problem with sending data to Akismet, just not this data!

Source

Broadcast Ping

Saturday, September 22nd, 2007

You can tell Linux to respond to broadcast pings by running this snippet from the console.

$ echo 0 | sudo tee /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

Edit /etc/sysctl.conf to set the option permanently.

Uptime - Take 2

Saturday, September 22nd, 2007

Turns out I had a computer on for even longer which I had forgotten about! benjamin, one of my Linksys WRT54-g’s. He doesn’t really do much apart from provide WiFi access for my PDA and networking for my room (two 100Mbps feeds are not enough). He will be moving back to Exeter with me later today, so beast will overtake him in terms of my record recorded uptime.

root@benjamin:~# uptime
 00:43:01 up 102 days, 43 min, load average: 0.00, 0.00, 0.00

Uptime

Friday, September 21st, 2007

Yesterday beast my NSLU2 passed 100 days of uptime a personal record for any of my machines, somewhat geeky :)

chris@beast:~$ uptime
 20:47:30 up 101 days,  3:00,  1 user,  load average: 0.08, 0.16, 0.11

Uptime Graph

New Nightwish Singles and Album

Thursday, September 20th, 2007

Nightwish are soon to be releasing a new album (1st Oct. in the UK) they have also released two singles, videos and audio-pr0n provided by YouTube. :)

Nightwish - Amaranth

Nightwish - Eva

Silly Signs

Friday, September 14th, 2007

Darn right they are silly.

Windows Firewall

Monday, September 3rd, 2007

I find a firewall on my windows installation personally a waste of resources, so I have it removed in my nLite customised installation media. Well I had problems installing the Company of Heros: Opposing Fronts Beta, it kept trying to adjust Windows Firewall and of course failing. So I had to reinstall it, found out how to here.