1
0
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:
Marc Alexander
2018-01-01 11:54:37 +01:00
8 changed files with 120 additions and 8 deletions

View File

@@ -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;

View File

@@ -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);
}
}