Commit 1ac4c8b5 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(core) sonar fix

issue #5840
Showing with 2 additions and 4 deletions
+2 -4
......@@ -61,10 +61,8 @@ class CSRFProtection
if (!empty($_SERVER['HTTP_HOST'])) {
$target = $_SERVER['HTTP_HOST'];
}
if ($target) {
if (!hash_equals($origin, $target)) {
throw new FusionDirectoryException('CSRF detected: origin and target are not matching ('.$origin.' != '.$target.')');
}
if ($target && !hash_equals($origin, $target)) {
throw new FusionDirectoryException('CSRF detected: origin and target are not matching ('.$origin.' != '.$target.')');
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment