Commit a62b8c0a authored by Lukas Haemmerle's avatar Lukas Haemmerle
Browse files

Limite number of IdPs in SAML domain cookie to 5 as suggested in #3791

parent 03460dd0
......@@ -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){
return $CookieArray;
Markdown is supported
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