Bug 213332

Summary: Pasted "patch" attachments are wrongly processed
Product: Services Reporter: VK <vlad-fbsd>
Component: Bug TrackerAssignee: Bugmeister <bugmeister>
Status: New ---    
Severity: Affects Only Me Keywords: needs-qa
Priority: ---    
Version: unspecified   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205623
Attachments:
Description Flags
nss.patch
none
nss.patch
none
nss.patch pasted
none
nss.patch pasted
none
nss.patch pasted (copied via ssh)
none
nss.patch pasted (copied via ssh) none

Description VK freebsd_triage 2016-10-09 09:33:34 UTC
It appears that attachments marked "patch", when pasted (not uploaded as a file), are wrongly processed. Test cases coming up.
Comment 1 VK freebsd_triage 2016-10-09 09:34:39 UTC
Created attachment 175561 [details]
nss.patch

Create attachment by UPLOADING a patch file, flagging it PATCH.
Comment 2 VK freebsd_triage 2016-10-09 09:35:13 UTC
Created attachment 175562 [details]
nss.patch

Create attachment by UPLOADING a patch file, not flagged as patch.
Comment 3 VK freebsd_triage 2016-10-09 09:37:04 UTC
Created attachment 175563 [details]
nss.patch pasted

Create attachment by PASTING patch file contents, obtained by catting the nss.patch in Ubuntu terminal, then copying the contents.

Flagged as PATCH.
Comment 4 VK freebsd_triage 2016-10-09 09:38:04 UTC
Created attachment 175564 [details]
nss.patch pasted

Create attachment by PASTING patch file contents, obtained by catting the nss.patch in Ubuntu terminal, then copying the contents.

NOT flagged as patch (bugzilla shows "auto-detect" for content type)
Comment 5 VK freebsd_triage 2016-10-09 09:42:26 UTC
Created attachment 175565 [details]
nss.patch pasted (copied via ssh)

Contents PASTED, but obtained by copying the output of `svn diff security/nss` from terminal connection to the build server over ssh... Flagged as PATCH.
Comment 6 VK freebsd_triage 2016-10-09 09:43:10 UTC
Created attachment 175566 [details]
nss.patch pasted (copied via ssh)

Contents PASTED, but obtained by copying the output of `svn diff security/nss` from terminal connection to the build server over ssh...

NOT flagged as patch.
Comment 7 VK freebsd_triage 2016-10-09 09:44:18 UTC
So, if flagged as PATCH and copied over SSH, it's mungled:

https://bz-attachments.freebsd.org/attachment.cgi?id=175565&action=diff&format=raw&headers=1