diff options
author | Marc Alexander <admin@m-a-styles.de> | 2018-01-01 11:54:37 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2018-01-01 11:54:37 +0100 |
commit | bf5f11e11ac0f25441ba891fc16d5a780e4450e2 (patch) | |
tree | 12aa20249ca31f91fa3c8ab6795a2bce6f55f3a4 /phpBB/phpbb/profilefields | |
parent | 0ff5f9fa0edf9ac3125cc4e871609a90cee1cfac (diff) | |
parent | f7d387f93c421e93ef13375bd5e0fb408e921598 (diff) | |
download | forums-bf5f11e11ac0f25441ba891fc16d5a780e4450e2.tar forums-bf5f11e11ac0f25441ba891fc16d5a780e4450e2.tar.gz forums-bf5f11e11ac0f25441ba891fc16d5a780e4450e2.tar.bz2 forums-bf5f11e11ac0f25441ba891fc16d5a780e4450e2.tar.xz forums-bf5f11e11ac0f25441ba891fc16d5a780e4450e2.zip |
Merge branch 'ticket/security/211' into ticket/security/211-rhea
Diffstat (limited to 'phpBB/phpbb/profilefields')
-rw-r--r-- | phpBB/phpbb/profilefields/type/type_string_common.php | 1 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/type/type_url.php | 17 |
2 files changed, 16 insertions, 2 deletions
diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php index f5e1992044..2648d03930 100644 --- a/phpBB/phpbb/profilefields/type/type_string_common.php +++ b/phpBB/phpbb/profilefields/type/type_string_common.php @@ -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; diff --git a/phpBB/phpbb/profilefields/type/type_url.php b/phpBB/phpbb/profilefields/type/type_url.php index 375cf5b19a..7bdd60e19d 100644 --- a/phpBB/phpbb/profilefields/type/type_url.php +++ b/phpBB/phpbb/profilefields/type/type_url.php @@ -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); + } } |