mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 08:32:16 +01:00
chore: slight improvement of the encrypt feature to be more in line with others features
This commit is contained in:
@@ -178,12 +178,10 @@ func (engine *QPdf) Encrypt(ctx context.Context, logger *zap.Logger, inputPath,
|
||||
return errors.New("user password cannot be empty")
|
||||
}
|
||||
|
||||
// If owner password is not provided, use the user password as owner password
|
||||
if ownerPassword == "" {
|
||||
ownerPassword = userPassword
|
||||
}
|
||||
|
||||
// QPDF command to encrypt a PDF
|
||||
var args []string
|
||||
args = append(args, inputPath)
|
||||
args = append(args, engine.globalArgs...)
|
||||
|
||||
Reference in New Issue
Block a user