logilab-common #207561 CVE-2014-1838: temp file issue in pdf_ext.py [validation pending]

def extract_keys_from_pdf(filename):
# what about using 'pdftk filename dump_data_fields' and parsing the output ?
os.system('pdftk %s generate_fdf output /tmp/toto.fdf' % filename)
lines = file('/tmp/toto.fdf').readlines()
return extract_keys(lines)

def fill_pdf(infile, outfile, fields):
write_fields(file('/tmp/toto.fdf', 'w'), fields)
os.system('pdftk %s fill_form /tmp/toto.fdf output %s flatten' % (infile, outfile))

priorityimportant
typebug
appeared in<not specified>
done in0.61.0
load0.500
load left0.000
debian bug number737051
closed by#1650:9c28b5b35b38
patchRemove pdf_ext module (closes #207561) [applied]