v1.1.2-cvs
----------
+[mjr] Enforce the same allowed characters for tags as slugs (Bug #9005).
[mjr] Fix clicking on image edit actions causes logout when not using cookies.
[mjr] Fix adding a face name from the gallery faces view (Bug #9002).
$insert = $GLOBALS['ansel_db']->prepare('INSERT INTO ansel_tags (tag_id, tag_name) VALUES(?, ?)');
foreach ($tags as $tag) {
if (!empty($tag)) {
+ if (!preg_match("/^[a-zA-Z0-9%_+.!*',()~-]*$/", $tag)) {
+ return PEAR::raiseError(_("Invalid characters in tag"));
+ }
$tag = Horde_String::lower(trim($tag));
$sql = $GLOBALS['ansel_db']->prepare('SELECT tag_id FROM ansel_tags WHERE tag_name = ?');
$result = $sql->execute(Horde_String::convertCharset($tag, Horde_Nls::getCharset(), $GLOBALS['conf']['sql']['charset']));