Skip to content

Commit 58e3dc7

Browse files
mrvanesc00kiemon5ter
authored andcommitted
Never map FriendlyName to SAML name
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 36b574a commit 58e3dc7

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

src/saml2/attribute_converter.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -278,23 +278,15 @@ def from_dict(self, mapdict):
278278

279279
def lcd_ava_from(self, attribute):
280280
"""
281-
In nothing else works, this should
281+
If nothing else works, this should
282282
283-
:param attribute: An Attribute Instance
283+
:param attribute: an Attribute instance
284284
:return:
285285
"""
286-
try:
287-
name = attribute.friendly_name.strip()
288-
except AttributeError:
289-
name = attribute.name.strip()
290-
291-
values = []
292-
for value in attribute.attribute_value:
293-
if not value.text:
294-
values.append('')
295-
else:
296-
values.append(value.text.strip())
297-
286+
name = attribute.name.strip()
287+
values = [
288+
(value.text or '').strip()
289+
for value in attribute.attribute_value]
298290
return name, values
299291

300292
def fail_safe_fro(self, statement):

0 commit comments

Comments
 (0)