Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect password protected xls files #386

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Conversation

saks
Copy link
Contributor

@saks saks commented Dec 18, 2023

This PR fixes #385. It looks like Protect record that is currently used for password protected files detection may not be the best option. There are two reasons:

  1. It is easy to find/create a file that triggers unrelated error.
  2. Spec suggests that:

A property that is applied manually to a file or a portion of a file, with or without a password, and that helps prevent users from accidentally or deliberately changing, moving, or deleting data.

this property may signify another kind of protection but not necessarily the password one.
I've noticed that some libraries are trying to detect "FilePass" instead and it works better for problematic files that we have.

I was not able to determine if it is necessary to keep logic related to "Protect" record in place (my changes do not break any tests), please suggest if we need to keep it.

@tafia tafia merged commit a58e8a5 into tafia:master Dec 19, 2023
4 checks passed
@tafia
Copy link
Owner

tafia commented Dec 19, 2023

Thanks!

@saks saks deleted the encrypted_xls branch December 19, 2023 15:00
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.

Password protected XLS is not detected
2 participants