mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 19:24:01 +02:00
Merge branch 'ticket/security/211' into ticket/security/211-rhea
This commit is contained in:
@@ -108,7 +108,6 @@ abstract class type_string_common extends type_base
|
||||
return null;
|
||||
}
|
||||
|
||||
$field_value = make_clickable($field_value);
|
||||
$field_value = censor_text($field_value);
|
||||
$field_value = bbcode_nl2br($field_value);
|
||||
return $field_value;
|
||||
|
@@ -64,11 +64,26 @@ class type_url extends type_string
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!preg_match('#^' . get_preg_expression('url') . '$#iu', $field_value))
|
||||
if (!preg_match('#^' . get_preg_expression('url_http') . '$#iu', $field_value))
|
||||
{
|
||||
return $this->user->lang('FIELD_INVALID_URL', $this->get_field_name($field_data['lang_name']));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function get_profile_value($field_value, $field_data)
|
||||
{
|
||||
if (!preg_match('#^' . get_preg_expression('url_http') . '$#iu', $field_value))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$field_value = make_clickable($field_value);
|
||||
|
||||
return parent::get_profile_value($field_value, $field_data);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user