It's indeed good these are fixed quickly. But I'm less impressed with the fact that these errors were in the code in the first place. I really don't want to blame anyone or sound too negative, but if you look at the code:
At line 8 and 9 $_GET variables are included. Just 10 lines lower one of them is echo'd out without any escaping or validation.
Another 20 lines down one of them is used directly in a query. Again without any validation or escaping.
These are so obvious and easy to spot. Why have they been overlooked? And what about the possible harder to spot vulnerabilities?
I think it would be a lot better to rewrite the code in such a way that there are a few distinct groups of variables. One is raw input (GET, POST, SERVER, etc). The second is a $clean array, only containing validated content. So
`$clean = array();
$clean['somenumericid'] = (int)$_GET['someid'];
`
for a variable which must be an integer
etc etc
Then the third and fourth are used in output to HTML and output to mysql:
`
$html = array();
$sql = array();
$html['somevar'] = htmlentities($clean['somevar'], ENT_QUOTES, 'UTF-8');
$sql['var'] = mysql_real_escape_string($clean['var']);
`
Everybody familiar with Chris Shifflet's work will recognize the ideas.
If there's any help needed, I would be willing to help. I use zenphoto and it's a great piece of software and I'm thankful to the developers who have put a lot of work in it.