0001-saml-handle-empty-user-roles-attributes-7532.patch
wcs/qommon/saml2.py | ||
---|---|---|
431 | 431 |
m = {} |
432 | 432 |
try: |
433 | 433 |
for attribute in assertion.attributeStatement[0].attribute: |
434 |
# always mark the attribute as being present, even if it won't |
|
435 |
# have any value, as an empty value (role-slug) must not be |
|
436 |
# ignored. |
|
437 |
m.setdefault(attribute.name, []) |
|
434 | 438 |
try: |
435 | 439 |
d[attribute.name] = attribute.attributeValue[0].any[0].content |
436 | 440 |
for attribute_value in attribute.attributeValue: |
437 |
l = m.setdefault(attribute.name, [])
|
|
441 |
l = m[attribute.name]
|
|
438 | 442 |
l.append(attribute_value.any[0].content) |
439 | 443 |
except IndexError: |
440 | 444 |
pass |
441 |
- |