summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-02-16 19:35:03 +0000
committerthomascube <thomas@roundcube.net>2007-02-16 19:35:03 +0000
commitb3ce7915610a6d272cc38ecd2a8b61e04ee4aeae (patch)
tree19456d201c65ccd4a305817a9ffbd0f477f11d49 /program/include
parent1012ea3946d7fb9c2b8d9598704d6ba64e8db218 (diff)
Better input checking on GET and POST vars
Diffstat (limited to 'program/include')
-rw-r--r--program/include/main.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index d914e3ecb..88c22b85e 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1689,12 +1689,12 @@ function create_attrib_string($attrib, $allowed_attribs=array('id', 'class', 'st
function parse_attrib_string($str)
{
$attrib = array();
- preg_match_all('/\s*([-_a-z]+)=["]([^"]+)["]?/i', stripslashes($str), $regs, PREG_SET_ORDER);
+ preg_match_all('/\s*([-_a-z]+)=(["\'])([^"]+)\2/Ui', stripslashes($str), $regs, PREG_SET_ORDER);
// convert attributes to an associative array (name => value)
if ($regs)
foreach ($regs as $attr)
- $attrib[strtolower($attr[1])] = $attr[2];
+ $attrib[strtolower($attr[1])] = $attr[3];
return $attrib;
}