Certificate security - ability to edit PDF files

Certificate security - ability to edit PDF files

by Elena Ivanova -
Number of replies: 3

Hi, I am not able to find similar posts/bug reports, so please let me know if there is one. 

I believe there is a bug in the module in Moodle 2, as it allows users to edit issued PDF certificates in Adobe Acrobat, so they can modify dates, grades, and basically anything there. 
Previously they would get a message that the document is locked from editing. 

Certificate versions: 2012092101, 2012121302

Anyone can confirm it is not just me, so I can submit a bug report?

Thank you smile

 

 

Average of ratings: -
In reply to Elena Ivanova

Re: Certificate security - ability to edit PDF files

by Jean-Michel Védrine -

Hello Helena,

If you want to forbid pdf modifications, you need to add a line in your custom certificate using the $pdf->SetProtection function.

Some remarks:

Maybe it's just me but I have found the SetProtection somewhat buggy: when I use it, it happen some elements in the pdf disappear or turn to gibberish

Protection without encription and a (good) password is nothing wink

 

In reply to Jean-Michel Védrine

Re: Certificate security - ability to edit PDF files

by Elena Ivanova -

Thank you so much,  Jean-Michel!

But I seem to recall that certificate was not allowing modifications previously. 

There were several  forum discussions where people asked on how they can possibly overcome the security  and actually edit the PDF files.
E.g. How to unprotect, or remove password

Something did change in the certificate code, imho - CONTRIB-4301

 

In reply to Elena Ivanova

Re: Certificate security - ability to edit PDF files

by Jean-Michel Védrine -

Yes I was aware of this change

If you look at older versions of the certificate module, in certificate types you will see the line

$pdf->SetProtection(array('print'));

it was wrong because it was forbidding student from printing certificates which is needed in a lot of situations. So it was removed and this was a good decision.

If you want to prevent modifications, you need to insert the line

$pdf->SetProtection(array('modify'));

in your certifiate type.

But this would be a new feature because this line was never part of the certificate module and maybe not everybody would like it ?

Also if Mark add this line it will only work for people using the base certificates types (A4_embedded, A4_non_embedded, letter_embedded and letter_non_embedded) and not all the other customized ones.

IMHO this is part of certificate customization: if you want a certificate not to be modifiable, it's up to you to include that line in your certificate type.

the SetProtection command has a lot of other options see documentation

This is a limitation of the current certificate module: it is extremely customizable but you need some knowledge to customize it and server access to upload your images and certificates. Hopefully the new module (customcert) developed by Mark will change that. Maybe in that new module it would be good to have a checkbox option to prevent certificate modification ?