Bug 59920 - Unexpected change in behaviour for XSSFWorkbook.setWorkbookPassword
Summary: Unexpected change in behaviour for XSSFWorkbook.setWorkbookPassword
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-01 10:00 UTC by David North
Modified: 2016-08-01 12:51 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David North 2016-08-01 10:00:29 UTC
At some point between 3.14 and current trunk, the behaviour of the following code changed:

XSSFWorkbook.setWorkbookPassword("");

Previously this would result in no password on the workbook, but protection enabled. Now, a password is set which renders the workbook impossible to un-protect (Excel doesn't accept the empty string as a password).

Passing null disables protection entirely; we want an option which protects the workbook but not with a password.

Fix to follow shortly.
Comment 1 David North 2016-08-01 12:51:33 UTC
Fixed r1754744