This morning I finished adding the last of the CSRF protection to Hotaru 0.9 and then gave some serious thought to whether or not I'm satisfied with how Hotaru is designed. And you know what? I'm not. The fact is, these "bite-size" plugins of functionality that were supposed to be independent of each other and small enough for a newbie to get their head around, have grown into big, intertwining balls of spaghetti that confuse even me - and I made them! Well, that's ...
This week, my time will be taken up with adding cross-site request forgery protection to all the forms in Hotaru. I have a list here of 22 forms that I should add random, database-stored tokens to in the hope that people can't hack in by duplicating some of the more sensitive forms and directing them at Hotaru sites. I've done 9 forms so far, but those 22 don't include all the admin settings pages for each plugin. I'll have to do those, too! Yawn... what a tedious job. I would much ...
One thing I'd like to add to Hotaru during beta testing is error logging. I think it would be extremely helpful for developers if errors were logged to a text file whenever they occur, and in some cases, have an email sent to the site admin about those errors. An example of when this would be useful is with the RPX plugin which I'm working on now. When a new user registers, an attempt is made to map the database record of that user with his or her record on the RPX server. Should this ...
The Pligg Importer takes such a long time to import data, that I have time for another blog post! It turns out that the changes I made to the way user permissions work broke the Pligg Importer, but finding out why took ages to figure out! The plugin takes an XML file and break it down into objects, but I never thought that assigning a string to an object would then make that string an object! Here's a string: PHP Code: $role = 'admin'; Here's an object: ...
$role = 'admin';
I know I'm going to forget this so I'm making a note of it here. If you have two associative arrays... PHP Code: $test1['fruit'] = "banana";$test1['veg'] = "cabbage";$test2['fruit'] = "banana";$test2['veg'] = "lettuce"; ... and want to merge them, the array before the plus operator overwrites the one after it: PHP Code: print_r($test1 + $test2); print_r($test2 + $test1); Results in: Array ( ...
$test1['fruit'] = "banana";$test1['veg'] = "cabbage";$test2['fruit'] = "banana";$test2['veg'] = "lettuce";
print_r($test1 + $test2); print_r($test2 + $test1);