mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17176] Limit characters for bbcode uid
PHPBB3-17176
This commit is contained in:
parent
0b36bb2218
commit
daf30b89f1
2 changed files with 3 additions and 2 deletions
|
@ -36,7 +36,7 @@ function gen_rand_string($num_chars = 8)
|
|||
$output = '';
|
||||
for ($i = 0; $i < $num_chars; $i++)
|
||||
{
|
||||
$rand = random_int(0, $size-1);
|
||||
$rand = random_int(0, $size - 1);
|
||||
$output .= $range[$rand];
|
||||
}
|
||||
|
||||
|
|
|
@ -1056,7 +1056,8 @@ class parse_message extends bbcode_firstpass
|
|||
function __construct($message = '')
|
||||
{
|
||||
// Init BBCode UID
|
||||
$this->bbcode_uid = substr(base_convert(unique_id(), 16, 36), 0, BBCODE_UID_LEN);
|
||||
$unique_id = preg_replace('/[^0-9a-f]/', '', unique_id());
|
||||
$this->bbcode_uid = substr(base_convert($unique_id, 16, 36), 0, BBCODE_UID_LEN);
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue