Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GIP RENATER
switch-wayf
Commits
a62b8c0a
Commit
a62b8c0a
authored
Dec 20, 2017
by
Lukas Haemmerle
Browse files
Limite number of IdPs in SAML domain cookie to 5 as suggested in #3791
parent
03460dd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
functions.php
View file @
a62b8c0a
...
...
@@ -148,7 +148,8 @@ function getValueFromIdPArray($CookieArray){
}
/******************************************************************************/
// Append a value to the array of IDPs
// Append a value to the array of IDPs, ensure no more than 5
// entries are in array
function
appendValueToIdPArray
(
$value
,
$CookieArray
){
// Remove value if it already existed in array
...
...
@@ -161,6 +162,12 @@ function appendValueToIdPArray($value, $CookieArray){
// Add value to end of array
$CookieArray
[]
=
$value
;
// Shorten array from beginning as latest entry should
// be at end according to SAML spec
while
(
count
(
$CookieArray
)
>
5
){
array_shift
(
$CookieArray
);
}
return
$CookieArray
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment