[ https://issues.apache.org/jira/browse/TIKA-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17733210#comment-17733210 ]
ASF GitHub Bot commented on TIKA-4082: -------------------------------------- tballison opened a new pull request, #1196: URL: https://github.com/apache/tika/pull/1196 <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> Thanks for your contribution to [Apache Tika](https://tika.apache.org/)! Your help is appreciated! Before opening the pull request, please verify that * there is an open issue on the [Tika issue tracker](https://issues.apache.org/jira/projects/TIKA) which describes the problem or the improvement. We cannot accept pull requests without an issue because the change wouldn't be listed in the release notes. * the issue ID (`TIKA-XXXX`) - is referenced in the title of the pull request - and placed in front of your commit messages surrounded by square brackets (`[TIKA-XXXX] Issue or pull request title`) * commits are squashed into a single one (or few commits for larger changes) * Tika is successfully built and unit tests pass by running `mvn clean test` * there should be no conflicts when merging the pull request branch into the *recent* `main` branch. If there are conflicts, please try to rebase the pull request branch on top of a freshly pulled `main` branch * if you add new module that downstream users will depend upon add it to relevant group in `tika-bom/pom.xml`. We will be able to faster integrate your pull request if these conditions are met. If you have any questions how to fix your problem or about using Tika in general, please sign up for the [Tika mailing list](http://tika.apache.org/mail-lists.html). Thanks! > Extraction from Microsoft Sharepoint protected PDFs doesn't expose exception > like other parsers. > ------------------------------------------------------------------------------------------------ > > Key: TIKA-4082 > URL: https://issues.apache.org/jira/browse/TIKA-4082 > Project: Tika > Issue Type: Bug > Components: parser > Affects Versions: 2.4.1 > Reporter: Carey Halton > Priority: Minor > Attachments: MSFT Transcript FY23-Q3.pdf, > PasswordProtectedWorkbook.xlsx, Screenshot from 2023-06-14 18-13-21.png, > password protected pdf exception.txt, password protected xlsx exception.txt, > screenshot-1.png > > > I have attached a PDF file (see "MSFT Transcript FY23-Q3.pdf") that we are > currently attempting to extract content from using Tika 2.4.1 (via Tika > server), but since the file has had password protection added to it via > Microsoft Sharepoint service, instead of getting the actual file content, we > get content that says this: > " > _This PDF file is protected_ > __ > _You'll need a different reader in order to view this content:_ > _Download a compatible PDF reader._ > __ > _This PDF Document has been protected._ > _The reader you are using does not support opening files protected by > Microsoft Office_ > _http://go.microsoft.com/fwlink/?LinkID=231373_ > " > Which is fine since the original content can obviously not be accessed > without the password. It also throws an exception that we can see in > "X-TIKA:EXCEPTION:embedded_warning" that is attached in the file "password > protected pdf exception.txt". > But we were surprised that we see any content at all as we have a similar > document (see attached "PasswordProtectedWorkbook.xlsx") that we test with > that is password protected in a similar way, albeit a XLSX instead of a PDF, > that doesn't return any content and throws an exception in > "X-TIKA:EXCEPTION:container_exception" (attached in "password protected > xlsx.txt"), which we currently treat as a failure mode. whereas we don't > currently treat "X-TIKA:EXCEPTION:embedded_warning" as a failure. > I realize these are different parsers, but since it is a very similar > scenario, should they not be treated in the same way, at least voiding all > content and emitting a proper failing exception instead of just what appears > to be considered a warning? We are hesitant to make all instances of > "X-TIKA:EXCEPTION:embedded_warning" as failures as we are unsure what other > kinds of errors can be surfaced in that way. But it is clear to us that > password protected files should be considered as failed to process. Thoughts? -- This message was sent by Atlassian Jira (v8.20.10#820010)