mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/11538] Make sure group color can't exceed maximum of 6 characters
In order to prevent future issues with this, a basic set of functional tests for the UCP groups manage page have been added. PHPBB3-11538
This commit is contained in:
@@ -597,6 +597,16 @@ class ucp_groups
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
// Make sure maximum length of 6 of group color is not exceeded
|
||||
if (strpos($submit_ary['colour'], '#') === 0)
|
||||
{
|
||||
$submit_ary['colour'] = substr($submit_ary['colour'], 1, 6);
|
||||
}
|
||||
else
|
||||
{
|
||||
$submit_ary['colour'] = substr($submit_ary['colour'], 0, 6);
|
||||
}
|
||||
|
||||
// Only set the rank, colour, etc. if it's changed or if we're adding a new
|
||||
// group. This prevents existing group members being updated if no changes
|
||||
// were made.
|
||||
|
Reference in New Issue
Block a user