Sanitize fullName parameter of join API. Fixes #10818

This commit is contained in:
Tiago Daniel Jacobs 2020-11-13 05:59:31 +00:00
parent cafe1a53ce
commit 5c911ddeec

View File

@ -245,6 +245,8 @@ class ApiController {
// Do we have a name for the user joining? If none, complain.
if (!StringUtils.isEmpty(params.fullName)) {
params.fullName = StringUtils.strip(params.fullName);
// remove control characters ( sanitize )
params.fullName = params.fullName.replaceAll("\\p{Cntrl}", "");
if (StringUtils.isEmpty(params.fullName)) {
errors.missingParamError("fullName");
}