Skip to content

PGPData fixes#627

Open
seanjmullan wants to merge 1 commit into
mainfrom
PGPData-fixes
Open

PGPData fixes#627
seanjmullan wants to merge 1 commit into
mainfrom
PGPData-fixes

Conversation

@seanjmullan

Copy link
Copy Markdown
Member

Fix bit masking issue when checking. Check for invalid key packets when unmarshalling PGPData from XML.

@coheigea coheigea left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible issue:

checkKeyPacket throws IllegalArgumentException (unchecked), while the XML constructor is declared [public DOMPGPData(Element pdElem) throws MarshalException]. That mismatch creates an API contract problem: any caller that only catches [MarshalException] to handle all XML-constructor failures will let the IllegalArgumentException escape silently.

Required fix: wrap the call inside the XML constructor to honour its own declared contract:

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