Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-20358

Wrong message when viewfile renders password protected PDF

    XMLWordPrintable

Details

    Description

      When using the viewfile macro to view a password protected PDF file, the following exception is thrown 3 times, and then the user sees a message telling him that the PDF is still being rendered and to refresh the page later. Upon refreshing the same exception is thrown another 3 times.

      com.sun.pdfview.decrypt.PDFAuthenticationFailureException: Password failed authentication for both owner and user password
      	at com.sun.pdfview.decrypt.StandardDecrypter.<init>(StandardDecrypter.java:188)
      	at com.sun.pdfview.decrypt.PDFDecrypterFactory.createStandardDecrypter(PDFDecrypterFactory.java:316)
      	at com.sun.pdfview.decrypt.PDFDecrypterFactory.createDecryptor(PDFDecrypterFactory.java:99)
      	at com.sun.pdfview.PDFFile.readTrailer(PDFFile.java:1085)
      	at com.sun.pdfview.PDFFile.parseFile(PDFFile.java:1397)
      	at com.sun.pdfview.PDFFile.<init>(PDFFile.java:129)
      	at com.sun.pdfview.PDFFile.<init>(PDFFile.java:101)
      	at com.benryan.conversion.SlideConversionThread.convertFile(SlideConversionThread.java:74)
      	at com.benryan.conversion.SlideConversionThread.run(SlideConversionThread.java:127)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:619)
      

      The fix could either be to support password protected PDFs by allowing the user to enter a password in a password field in the PDF viewer macro, or to display an appropriate error message such as "The file foo.pdf cannot be displayed because it is password protected."

      See attachment for example PDF.

      Attachments

        Issue Links

          Activity

            People

              shaffenden Steve Haffenden (Inactive)
              nbhawnani Niraj Bhawnani
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: