Skip to content

Never return None in ooxml's _parseinfo#88

Merged
nolze merged 1 commit intonolze:masterfrom
gdesmar:patch-1
May 2, 2024
Merged

Never return None in ooxml's _parseinfo#88
nolze merged 1 commit intonolze:masterfrom
gdesmar:patch-1

Conversation

@gdesmar
Copy link
Copy Markdown
Contributor

@gdesmar gdesmar commented May 1, 2024

In the case where we are handling a corrupted file, the EncryptionInfo could be versionMajor 0 and versionMinor 0. In that case, the code ends up returning None, which then tries to get unpacked into two objects for self.type and self.info. By always throwing and exception, it should cover the case where the code doesn't handle the specified EncryptionInfo version.

@nolze
Copy link
Copy Markdown
Owner

nolze commented May 2, 2024

Thanks! Much appreciated.

@nolze nolze merged commit c5abf6a into nolze:master May 2, 2024
@nolze nolze removed the in progress label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants