string commentText = sanitize(sanitize(getVariable("commentText", var.POST), clean.TAGS), clean.DB);
This line is from the saveComment() method where we pluck the commentText POST variable. We just added an extra level of sanitizing to it where the tags are removed.
Et voilą, that security hole has been closed. We're going to call this tutorial over with at this point. There's definitely a possibility there are other bugs in here that I did not catch. And there is a lot of missing functionality. For instance, how do we make invisible blogs and comments visible again? Right now the only way is to go manually into the database: there is no UI. What if a blogger is a bad person and puts maliciouis javascript into his blog? And of course there are many other things I'm sure you could think of.
Files To This Point