Question

How to correctly test MimeType of file Attach

Hi,

For Security requirements, i have a requirement to implement checks on file attached.
i've already extended activity CallVirusCheck to verify the file extension, but how can i test if the extension corresponds to the real file format?
ex: pdf extension is a real pdf file and not a txt file with modified extension

i'm running with Pega PRPC 7.1.9 and FCC 7.13

thank everyone for you help

Best regards

Comments

Keep up to date on this post and subscribe to comments

June 14, 2019 - 10:15am

June 18, 2019 - 8:44am
Response to BradTainter_GCS

Thank you @BradTainter sure the link is helpful, but i wanted to implement the check always on CallVirusCheck Activity, Is there a way to check the header from Data-WorkAttach-File Page? maybe with pyAttachStream property?

thank you for your help!

Best Regards

Andrea

June 18, 2019 - 8:44am

hi, everyone, it's possible to check the header of the file, loading with java?
for example we can load the file with:

PRFile file1 = new PRFile(FileName);
PRInputStream myxls = new PRInputStream(file1);

an then check the header?

Thank you