Title:
Bug 75593:This was discussed in the pre-release forum, but I wanted to make sure an official bug report was made and the root cause identified
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Jeremy Moore / Jeremy Moore (Jeremy Moore)
Created: 02/19/2009
Components: Document Management, PDF generation
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 00000 / 280791
Priority/Frequency: Major / Unknown
Locale/System: English / Win All
Vote Count: 0
Problem:
This was discussed in the pre-release forum, but I wanted to make sure an official bug report was made and the root cause identified.
When creating a PDF with CFDOCUMENT and only the "userpassword" is specified, the security in the PDF that is created does not seem to be valid - there is no password that can be entered that will allow changes to the PDF using Acrobat Pro. As per the PDF spec, if only the user password is wanted, then the owner password should be set to the user password. This will make the PDF password protected but full rights to those who know the password. This seems to be a bug in CFDOCUMENT. Please run the sample code below and open the result code in Acrobat Pro then take note of the security settings.
The fix should be for CFDOCUMENT to automatically set the ownerpassword to the userpassword if only the userpassword attribute is defined, or make both attributes required if either one is specified.
This issue is also in CF8.
-Jeremy A. Moore
Method:
---------------------------------- badPDF.cfm
<cfdocument format="pdf" name="secret" userpassword="fred" encryption="128-bit">
This PDF should be password protected, but you cannot change the security in Acrobat Pro.
</cfdocument>
<cfheader name="Content-Disposition" value="inline; filename=foo.pdf">
<cfcontent type="application/pdf" variable="#toBinary(secret)#">
---------------------------------- goodPDF.cfm
<cfdocument format="pdf" name="secret" userpassword="fred" ownerpassword="fred" encryption="128-bit">
This PDF should be password protected and you should have full rights to the security.
</cfdocument>
<cfheader name="Content-Disposition" value="inline; filename=foo.pdf">
<cfcontent type="application/pdf" variable="#toBinary(secret)#">
----------------------------------
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3037617
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: Jeremy Moore
External Customer Email: AA0C39473794F33C9920FA82
External Test Config: 02/19/2009
Attachments:
Comments: