Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
sfroger
fusiondirectory
Commits
1ac4c8b5
Commit
1ac4c8b5
authored
6 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
fix(core) sonar fix
issue
#5840
parent
3b51b48c
master
1.3-fixes
6009-updating-the-locales-for-1-3-1
fusiondirectory-1.3
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/class_CSRFProtection.inc
+2
-4
include/class_CSRFProtection.inc
with
2 additions
and
4 deletions
+2
-4
include/class_CSRFProtection.inc
+
2
−
4
View file @
1ac4c8b5
...
...
@@ -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
.
')'
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets