You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/06/01 18:12:33 UTC

DO NOT REPLY [Bug 35897] Password protected files

https://issues.apache.org/bugzilla/show_bug.cgi?id=35897

--- Comment #6 from Antoni Mylka <an...@aduna-software.com> 2011-06-01 16:12:33 UTC ---
Created attachment 27101
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27101
A little hack which detects encrypted XLS files

This is based on an observation taken from the Excel Spec (page 119):

If you type a protection password (File menu, Save As command, Options dialog
box), the FILEPASS record appears in the BIFF file. The wProtPass field
contains the encrypted password. All records after FILEPASS are encrypted

The patch looks for the FilePass record. If it's found, all subsequent
RecordFormatExceptions are interpreted as encryption failures.

This doesn't cover the per-sheet passwords, only the per-file passwords. It
seems to work for me. Is there a better way?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org