Topic Options
#58040 - 06/11/21 06:45 AM Removing what looks like hardcoded metadata
Solar Offline
OL Toddler

Registered: 11/19/10
Posts: 34
Loc: UK
How easy is it to remove the below from the data created when using the Create PDF plugin, seen in the properties of the PDF

Author: PlanetPress

Application: PlanetPress Watch

It has been flagged up as low risk in a PEN test and I wondered if there was a way to remove this info, it looks hardcoded to me though

Thanks
Dave (PB)

Top
#58043 - 06/11/21 12:54 PM Re: Removing what looks like hardcoded metadata [Re: Solar]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 650
Loc: Québec, Canada
Using the following script you can change the values for those fields but I doubt you'll be able to remove those properties:
Code:
var pdfInfos = new ActiveXObject("AlambicEdit.PdfInfos");
var myPDF = Watch.GetPDFEditObject();

myPDF.Open(Watch.GetJobFileName(),false);

pdfInfos = myPDF.GetInfos();

pdfInfos.Author = "";
pdfInfos.Creator = "";

myPDF.SetInfos(pdfInfos);
myPDF.Save(false);
CollectGarbage();
myPDF.Close();
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top