diff --git a/htdocs/asterisk/wrapper.php b/htdocs/asterisk/wrapper.php index cc230431420..c26d6e802e8 100644 --- a/htdocs/asterisk/wrapper.php +++ b/htdocs/asterisk/wrapper.php @@ -118,6 +118,9 @@ $password = GETPOST('password', 'none'); $caller = GETPOST('caller', 'alphanohtml'); $called = GETPOST('called', 'alphanohtml'); +// Sanitize password to avoid to use the wrapper to inject malicious paylod into asterisk +$password = preg_replace('/[\n\r]/', '', $password); + // IP address of Asterisk server $strHost = getDolGlobalString('ASTERISK_HOST');