summaryrefslogtreecommitdiff
path: root/sys/src/cmd/upas/vf
AgeCommit message (Collapse)Author
2021-02-08[9front] upas/vf: exclude mime boundary from temporary attachment filesMichael Forney
validateattachment has no business with the mime boundary; it is not part of the attachment itself. Also, it causes the boundary to be dropped in the message output from upas/vf, effectively dropping the following attachment (though the content is still present after the last boundary of the wrapped first attachment part). Consider the following sequence of events: 1. upas/vf is run on a message containing two attachments. 2. The first attachment does not have a known extension, so is saved to a temporary file *including* the following mime boundary. 3. This file is opened as p->tmpbuf, which is used for subsequent reads until switching back to stdin. 4. The attachment fails validateattachment, so upas/vf wraps it in a multipart with a warning message. 5. problemchild() calls passbody(p, 0), which copies from p->tmpbuf until it hits the outer boundary line, which it excludes, seeks back one line, then returns the outer multipart. 6. problemchild() then writes its own boundary, and then copies one line from *stdin* to stdout, expecting the outer boundary. However, this boundary was already read from stdin in 2, so it ends up reading the first line of the subsequent part instead. To fix this, pass 0 to passbody() in save() to exclude it from the attachment file and make it available in stdin when expected.
2021-02-07[9front] upas/vf: remove debugging print statementsMichael Forney
These messages aren't useful and were presumably left over from someone debugging this code.
2021-02-07[9front] upas/vf: install %τ format specifierMichael Forney
upas/vf was converted to use tmdate, but the formatter was never installed. This caused it to send attachments to validateattachment with header `From virusfilter %τ%`, which always failed since upas/fs would just skip over the message.
2020-11-22upas/*: fix mkfile issues (thanks amavect)Ori Bernstein
Fixes 3 issues in our upas mkfiles: - mk/mkfile and send/mkfile were rebuilding only the rfc822.tab.$O, even though the header also needed to be rebuilt. - CLEANFILES had a pattern that would not get expanded. - Third, ../upas/mkfile was being included in the wrong place and making the wrong rule default.
2020-11-17upas/*: cleanup mkfiles (thanks amavect)Ori Bernstein
Changeset 50ad211fb12f broke the libcommon rule in mkupas. Deleting the 'mk clean' in the recipe fixes this. Cleanup includes deleting UPDATE vars from all mkfiles, reorganization of vars in TARG,LIB,OFILE,HFILE order, and deletion of extra vars used for UPDATE.
2020-09-26upas: convert to tmdate, change timezone formatOri Bernstein
Complete the conversion of upas to remove ctime, use the new date library, and print time zones in +hhmm format, instead of NNN format. This may affect code that expects specific names for timezones. Fix that code.
2017-03-12merging erik quanstros nupascinap_lenrek
2012-12-31fix utf and rune handling in preparation for 32bit runescinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen