Skip to content

pyFF fails if trustinfo profile is wrongly base64 encoded #304

@btmattsson

Description

@btmattsson

pyFF/src/pyff/samlmd.py

Lines 1057 to 1060 in 2fc6c10

for b64_trustinfo in b64_trustinfos:
str_trustinfo = b64decode(b64_trustinfo.encode('ascii'))
trustinfo = json.loads(str_trustinfo.decode('utf8'))
sp['profiles'].update(trustinfo['profiles'])

If this fails pyFF stops processing the rest of entities.
Would be better to print an error and continue with the rest.

Might add something line this
try:
str_trustinfo = b64decode(b64_trustinfo.encode('ascii'))
trustinfo = json.loads(str_trustinfo.decode('utf8'))
sp['profiles'].update(trustinfo['profiles'])
except Exception:
log.error(f"Error parsing TrustInfo profile for {sp['entityID']}")

issue.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions