Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-2888

setAllSecurityToBeRemoved(true) before calling protect() should have no effect

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Crypto
    • None

    Description

      As discussed on the mailing list:

      user rnibali had a problem where a file wasn't saved with encryption. The cause turned out to be that he had called

      setAllSecurityToBeRemoved(true)
      

      and then

      protect(...)
      

      Although the javadoc of both methods is clear, I see a risk that this happens again, e.g. when people combine existing code.

      Solution: set allSecurityToBeRemoved to false when protect() is called and log a warning.

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: