Development
23 Comments Check For Nasty Footers In WordPress Themes
Over the past few weeks, I’ve seen an increase in Base64 encoding in ‘free wordpress themes’… now bear with me if you have a wordpress… its not really that technical!
Base64 is just a way to encrypt code, usually in WordPress themes, its used to encrypt the footer template and 9 time out of 10, its an attempt to ensure that the designer is given credit by means of a link back to his website. Fair enough as they have put in the hard work.
However as the footer is encoded, it means that don’t actually see what else may well be hidden in the footer, something that has always concerned me. Maybe there are links to unfavourable sites, bits of java, images? It’s even possible to encode an iframes command that loads a merchant websites (basically cookie stuffing)! It’s definately something to be aware of, and in my opinion, something that as an affiliate, you should check and decode any Base64 footers to be sure everything is above board.
How will you know?
Well, an encoded footer will look out of the ordinary to any website owner. Instead of seeing the usual A HREF, IMG SRC or DIV codes, you will see something like this;
(base64_decode(‘FZnHDoRVElF/cmI7Iw5rpzUjvPc0pi8rvPeer9+eEyeoykdTxFjx13///dc/ijPp/6jecyz7cS/
+VZOtILD/5VI25cUf/xTzXF6nL5NKRLWW3oYgKuOvbaBUujXEvUvPQGkBK/0yywQt8Hue
sEyCoF2CuBvl47UC6TqPq9IeZgmQMlq+ZHbYy3ab28qcdLk167CdeHFGIeRZRN5wrsOKO
/o5kfSkR7T0mfxlz5jAl2h6k/vi7S4muQZQj8Qkn6j/mRpJ9YBahj4////V/’)
Obviously, unless you are a freak of nature, you won’t stand a chance of being able to read what has been encoded, and therefore you could be opening yourself up to problems in the future. In my opinion, the best thing to do is to decode the file and reload it to your webserver, leaving in place the link to the designers website, but at the same time, ensuring there is nothing dodgy lurking in the code.
How do you decode base64?
Download and extract this Zip file. Follow the instructions and you should then be able to easily and quickly decode any base64 encryption.
Is it ethical?
Many people think its unethical to do this, as some will remove the links to the designers homepage. However, I think I have a right to know what my website is linking to rather than trusting an encoded script. I have also read in places that its illegal to decrypt Base64 although I suspect this is a white lie. Sometimes, like in this theme (this was encoded), I want to add links to RSS feeds, Sitemaps etc. By decoding it, it then allows me to add anything I wish to in my footer – and you will notice that I still leave the link in place to the original designer.