Skip to content
Snippets Groups Projects
Verified Commit 17f16923 authored by Damien's avatar Damien
Browse files

FEAT #11158 TIME 0:15 Fix onlyoffice check key

parent e4a9a22f
No related branches found
No related tags found
No related merge requests found
......@@ -216,7 +216,7 @@ class ContactController
$contact = [
'id' => $rawContact['id'],
'civility' => $rawContact['civility'],
'civility' => !empty($rawContact['civility']) ? ContactModel::getCivilityLabel(['civilityId' => $rawContact['civility']]) : null,
'firstname' => $rawContact['firstname'],
'lastname' => $rawContact['lastname'],
'company' => $rawContact['company'],
......
......@@ -45,7 +45,7 @@ class OnlyOfficeController
if (!Validator::stringType()->notEmpty()->validate($body['onlyOfficeKey'])) {
return $response->withStatus(400)->withJson(['errors' => 'Query params onlyOfficeKey is empty']);
} elseif (!preg_match('/[^a-z0-9]/i', $body['onlyOfficeKey'])) {
} elseif (!preg_match('/[A-Za-z0-9]/i', $body['onlyOfficeKey'])) {
return $response->withStatus(400)->withJson(['errors' => 'Query params onlyOfficeKey is forbidden']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment