Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
2a377f72
Commit
2a377f72
authored
8 years ago
by
Jaime Pérez
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: Make sure empty strings are not acceptable for NameID generation.
This resolves #519.
parent
5923b743
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/saml/lib/Auth/Process/AttributeNameID.php
+9
-0
9 additions, 0 deletions
modules/saml/lib/Auth/Process/AttributeNameID.php
modules/saml/lib/Auth/Process/PersistentNameID.php
+8
-0
8 additions, 0 deletions
modules/saml/lib/Auth/Process/PersistentNameID.php
with
17 additions
and
0 deletions
modules/saml/lib/Auth/Process/AttributeNameID.php
+
9
−
0
View file @
2a377f72
...
...
@@ -67,6 +67,15 @@ class sspmod_saml_Auth_Process_AttributeNameID extends sspmod_saml_BaseNameIDGen
}
$value
=
array_values
(
$state
[
'Attributes'
][
$this
->
attribute
]);
// just in case the first index is no longer 0
$value
=
$value
[
0
];
if
(
empty
(
$value
))
{
SimpleSAML\Logger
::
warning
(
'Empty value in attribute '
.
var_export
(
$this
->
attribute
,
true
)
.
' on user - not generating persistent NameID.'
);
return
null
;
}
return
$value
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/saml/lib/Auth/Process/PersistentNameID.php
+
8
−
0
View file @
2a377f72
...
...
@@ -77,6 +77,14 @@ class sspmod_saml_Auth_Process_PersistentNameID extends sspmod_saml_BaseNameIDGe
$uid
=
array_values
(
$state
[
'Attributes'
][
$this
->
attribute
]);
// just in case the first index is no longer 0
$uid
=
$uid
[
0
];
if
(
empty
(
$uid
))
{
SimpleSAML\Logger
::
warning
(
'Empty value in attribute '
.
var_export
(
$this
->
attribute
,
true
)
.
' on user - not generating persistent NameID.'
);
return
null
;
}
$secretSalt
=
SimpleSAML\Utils\Config
::
getSecretSalt
();
$uidData
=
'uidhashbase'
.
$secretSalt
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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