1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

[ticket/11538] Fix incorrect regex and test for duplicate # in color string

PHPBB3-11538
This commit is contained in:
Marc Alexander 2013-05-14 21:27:25 +02:00
parent a547ba3f9d
commit 1fae7720e4
2 changed files with 2 additions and 1 deletions

View File

@ -597,7 +597,7 @@ class ucp_groups
if (!empty($submit_ary['colour']))
{
preg_match('/^(#?)+(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{3})\b/', $submit_ary['colour'], $group_colour);
preg_match('/^#?(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{3})\b/', $submit_ary['colour'], $group_colour);
if (sizeof($group_colour))
{

View File

@ -23,6 +23,7 @@ class phpbb_functional_ucp_groups_test extends phpbb_functional_test_case
array('#a00', 'GROUP_UPDATED'),
array('ag0', 'COLOUR_INVALID'),
array('#ag0', 'COLOUR_INVALID'),
array('##bcc', 'COLOUR_INVALID'),
);
}