You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "valerybokov (via GitHub)" <gi...@apache.org> on 2026/02/21 11:45:51 UTC
[PR] extract additional methods in SecurityHandler to reduce checks number [pdfbox]
valerybokov opened a new pull request, #424:
URL: https://github.com/apache/pdfbox/pull/424
I've extracted several methods because the decryptDictionary(COSDictionary, long, long) method has type checks (old code, line 616), and the decrypt(COSBase, long, long) method has the same type checks. So, there is double type check in the code. The new implementation of the decryptDictionary method calls overloads of the decrypt method for each type (COSString, COSArray, COSDictionary) to avoid double type check.
Perhaps all of these new methods should be made public (or all of them private). You're the one in charge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: [PR] extract additional methods in SecurityHandler to reduce checks number [pdfbox]
Posted by "asf-gitbox-commits (via GitHub)" <gi...@apache.org>.
asf-gitbox-commits closed pull request #424: extract additional methods in SecurityHandler to reduce checks number
URL: https://github.com/apache/pdfbox/pull/424
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: [PR] extract additional methods in SecurityHandler to reduce checks number [pdfbox]
Posted by "valerybokov (via GitHub)" <gi...@apache.org>.
valerybokov commented on PR #424:
URL: https://github.com/apache/pdfbox/pull/424#issuecomment-4000647275
> Around 616 the old code was calling the general method. The new code is calling the specific method, but now it will no longer execute the code part that checks whether that part has already been decrypted before?!
Thank you! I've fixed the bug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: [PR] extract additional methods in SecurityHandler to reduce checks number [pdfbox]
Posted by "THausherr (via GitHub)" <gi...@apache.org>.
THausherr commented on PR #424:
URL: https://github.com/apache/pdfbox/pull/424#issuecomment-3992726421
Around 616 the old code was calling the general method. The new code is calling the specific method, but now it will no longer execute the code part that checks whether that part has already been decrypted before?!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org