diff --git a/public/admin/tool/messageinbound/roundcube/rcube_utils.php b/public/admin/tool/messageinbound/roundcube/rcube_utils.php index b9db11f0a3a..7a413ad7dee 100644 --- a/public/admin/tool/messageinbound/roundcube/rcube_utils.php +++ b/public/admin/tool/messageinbound/roundcube/rcube_utils.php @@ -285,6 +285,22 @@ class rcube_utils return is_string($value) ? $value : ''; } + /** + * Check if input value is a "simple" string. + * "Simple" is defined as a non-empty string containing only + * - "word" characters (alphanumeric plus underscore), + * - dots, + * - dashes. + * + * @param string $input The string to test + * + * @return bool + */ + public static function is_simple_string($input) + { + return is_string($input) && !!preg_match('/^[\w.-]+$/i', $input); + } + /** * Read request parameter value and convert it for internal use * Performs stripslashes() and charset conversion if necessary @@ -1729,10 +1745,10 @@ class rcube_utils /** * Clean the subject from reply and forward prefix - * + * * @param string $subject Subject to clean * @param string $mode Mode of cleaning : reply, forward or both - * + * * @return string Cleaned subject */ public static function remove_subject_prefix($subject, $mode = 'both') diff --git a/public/admin/tool/messageinbound/thirdpartylibs.xml b/public/admin/tool/messageinbound/thirdpartylibs.xml index d1cca847600..74fbc9468ef 100644 --- a/public/admin/tool/messageinbound/thirdpartylibs.xml +++ b/public/admin/tool/messageinbound/thirdpartylibs.xml @@ -5,7 +5,7 @@ Roundcube Framework GPL 3.0+ - 1.6.10 + 1.6.11 https://github.com/roundcube/roundcubemail The Roundcube Dev Team