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
BARDOT Jérôme
fusiondirectory
Commits
3b51b48c
Commit
3b51b48c
authored
6 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
fix(core) Use FusionDirectoryException instead of Exception
issue
#5840
parent
d9089973
1.4-fixes
1.3.1-fixes
master
fusiondirectory-1.4
fusiondirectory-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
+3
-3
include/class_CSRFProtection.inc
with
3 additions
and
3 deletions
+3
-3
include/class_CSRFProtection.inc
+
3
−
3
View file @
3b51b48c
...
...
@@ -26,13 +26,13 @@ class CSRFProtection
return
;
}
if
(
empty
(
$_POST
[
'CSRFtoken'
]))
{
throw
new
Exception
(
'CSRF protection token missing'
);
throw
new
FusionDirectory
Exception
(
'CSRF protection token missing'
);
}
static
::
checkHeaders
();
if
(
$_POST
[
'CSRFtoken'
]
!==
static
::
getToken
())
{
throw
new
Exception
(
'CSRF protection token invalid'
);
throw
new
FusionDirectory
Exception
(
'CSRF protection token invalid'
);
}
}
...
...
@@ -63,7 +63,7 @@ class CSRFProtection
}
if
(
$target
)
{
if
(
!
hash_equals
(
$origin
,
$target
))
{
throw
new
Exception
(
'CSRF detected: origin and target are not matching ('
.
$origin
.
' != '
.
$target
.
')'
);
throw
new
FusionDirectory
Exception
(
'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