[ 
https://issues.apache.org/jira/browse/FOP-2844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patricia Piolon updated FOP-2844:
---------------------------------
    Description: 
It looks like FOPs encryption parameters don't work as one would expect.

(I am providing configuration options below, but *the same is true for command 
line options*)

They only work when providing the full set of options:

<encryption-params>
      <encryption-length>128</encryption-length>
      <user-password>testuserpass</user-password>
      <owner-password>testownerpass</owner-password>
      <noprint/>
      <nocopy/>
      <noedit/>
      <noannotations/>
      <nofillinforms/>
      <noaccesscontent/>
      <noassembledoc/>
      <noprinthq/>
   </encryption-params>

the above gives a fully restricted pdf, but this:

<encryption-params>
      <encryption-length>128</encryption-length>
      <user-password>testuserpass</user-password>
      <owner-password>testownerpass</owner-password>
      <noprint/>
   </encryption-params>

does *not* result in a pdf where printing is disallowed but e.g. annotating is. 
The no-printing option is not set in this case.

The only elements/options that can be left out are the user and owner passwords.

So this works:

<encryption-params>
      <encryption-length>128</encryption-length>
      <noprint/>
      <nocopy/>
      <noedit/>
      <noannotations/>
      <nofillinforms/>
      <noaccesscontent/>
      <noassembledoc/>
      <noprinthq/>
   </encryption-params>

But this does not:

<encryption-params>
      <encryption-length>128</encryption-length>
      <noprint/>
   </encryption-params>

 

Additionally it is not possible to only set the list of <no*/> encryption 
options in the configuration and then set the user and/or owner password at 
runtime - in this case the passwords are ignored.

  was:
It looks like FOPs encryption parameters don't work as one would expect.

(I am providing configuration options below, but *the same is true for command 
line options*)

They only work when providing the full set of options:

<encryption-params>
     <encryption-length>128</encryption-length>
     <user-password>testuserpass</user-password>
     <owner-password>testownerpass</owner-password>
     <noprint/>
     <nocopy/>
     <noedit/>
     <noannotations/>
     <nofillinforms/>
     <noaccesscontent/>
     <noassembledoc/>
     <noprinthq/>
  </encryption-params>

the above gives a fully restricted pdf, but this:

<encryption-params>
     <encryption-length>128</encryption-length>
     <user-password>testuserpass</user-password>
     <owner-password>testownerpass</owner-password>
     <noprint/>
  </encryption-params>

does *not* result in a pdf where printing is disallowed but e.g. annotating is.

The only elements/options that can be left out are the user and owner passwords.

So this works:

<encryption-params>
     <encryption-length>128</encryption-length>
     <noprint/>
     <nocopy/>
     <noedit/>
     <noannotations/>
     <nofillinforms/>
     <noaccesscontent/>
     <noassembledoc/>
     <noprinthq/>
  </encryption-params>

But this does not:

<encryption-params>
     <encryption-length>128</encryption-length>
     <noprint/>
  </encryption-params>

 

Additionally it is not possible to only set the list of <no*/> encryption 
options in the configuration and then set the user and/or owner password at 
runtime - in this case the passwords are ignored.


> FOP ignores encryption parameters except when you enter the full set
> --------------------------------------------------------------------
>
>                 Key: FOP-2844
>                 URL: https://issues.apache.org/jira/browse/FOP-2844
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.3
>         Environment: MacOS 10.14.2, not tested on other systems 
>            Reporter: Patricia Piolon
>            Priority: Major
>
> It looks like FOPs encryption parameters don't work as one would expect.
> (I am providing configuration options below, but *the same is true for 
> command line options*)
> They only work when providing the full set of options:
> <encryption-params>
>       <encryption-length>128</encryption-length>
>       <user-password>testuserpass</user-password>
>       <owner-password>testownerpass</owner-password>
>       <noprint/>
>       <nocopy/>
>       <noedit/>
>       <noannotations/>
>       <nofillinforms/>
>       <noaccesscontent/>
>       <noassembledoc/>
>       <noprinthq/>
>    </encryption-params>
> the above gives a fully restricted pdf, but this:
> <encryption-params>
>       <encryption-length>128</encryption-length>
>       <user-password>testuserpass</user-password>
>       <owner-password>testownerpass</owner-password>
>       <noprint/>
>    </encryption-params>
> does *not* result in a pdf where printing is disallowed but e.g. annotating 
> is. The no-printing option is not set in this case.
> The only elements/options that can be left out are the user and owner 
> passwords.
> So this works:
> <encryption-params>
>       <encryption-length>128</encryption-length>
>       <noprint/>
>       <nocopy/>
>       <noedit/>
>       <noannotations/>
>       <nofillinforms/>
>       <noaccesscontent/>
>       <noassembledoc/>
>       <noprinthq/>
>    </encryption-params>
> But this does not:
> <encryption-params>
>       <encryption-length>128</encryption-length>
>       <noprint/>
>    </encryption-params>
>  
> Additionally it is not possible to only set the list of <no*/> encryption 
> options in the configuration and then set the user and/or owner password at 
> runtime - in this case the passwords are ignored.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to