mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-17 22:11:26 +02:00
[ticket/14272] Only use maxlength and size for allowed input elements
PHPBB3-14272
This commit is contained in:
@@ -1735,8 +1735,8 @@ class acp_attachments
|
||||
$size_var = $filesize['si_identifier'];
|
||||
$value = $filesize['value'];
|
||||
|
||||
// size="8" and maxlength="15" attributes as a fallback for browsers that do not support type="number" yet.
|
||||
return '<input type="number" id="' . $key . '" size="8" maxlength="15" min="0" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
|
||||
// size and maxlength must not be specified for input of type number
|
||||
return '<input type="number" id="' . $key . '" min="0" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -842,7 +842,7 @@ class acp_board
|
||||
{
|
||||
global $user;
|
||||
|
||||
return '<input id="' . $key . '" type="number" size="3" maxlength="3" min="1" max="999" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="number" size="3" maxlength="3" min="8" max="180" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
|
||||
return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="number" min="8" max="180" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -870,7 +870,7 @@ class acp_board
|
||||
{
|
||||
global $user;
|
||||
|
||||
return '<input id="' . $key . '" type="number" size="3" maxlength="3" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="number" size="3" maxlength="3" min="8" max="255" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
|
||||
return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="number" min="8" max="255" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user