FreeBSD Bugzilla – Attachment 94235 Details for
Bug 132344
[patch] www/en/cgi/query-pr.cgi broken base64 attachments
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.42 KB, created by
David Horn
on 2009-03-05 21:10:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
David Horn
Created:
2009-03-05 21:10:01 UTC
Size:
1.42 KB
patch
obsolete
>--- query-pr.cgi.original 2009-03-05 15:26:02.000000000 -0500 >+++ query-pr.cgi 2009-03-05 15:47:03.000000000 -0500 >@@ -610,7 +610,13 @@ > if ($patchname =~ /$binary_filetypes/) { > $outp = "(Binary attachment not viewable.)\n"; > } else { >+ $outp =~ s/^X-Attachment-Id: \x0a?//i; >+ $outp =~ s/^f_.{7}[a-z]?[0-9]*//i; >+ $outp =~ s/^file[0-9]*//i; > $outp = decode_base64($outp); >+ if ($outp =~ /[[:^ascii:]]/) { >+ $outp = "(Unable to decode attachment using base64.)\n"; >+ } > } > > $outp = "--- $patchname begins here ---\n" >@@ -638,7 +644,9 @@ > } > next; > } else { >- $mime_endheader = 1; >+ # XXX: Commented out to fix an issue if transfer-encoding is not the >+ # last header before base64 payload really starts. >+ #$mime_endheader = 1; > if ($mime_headers{'transfer-encoding'}) { > my $enc = $mime_headers{'transfer-encoding'}; > if ($enc =~ /^\s*["']?base64["']?\s*$/i) { >@@ -1004,7 +1012,14 @@ > $inpatch = 0; > $mime_boundary = undef; > if ($outp ne "") { >- print decode_base64($outp); >+ $outp =~ s/^X-Attachment-Id: \x0a?//i; >+ $outp =~ s/^f_.{7}[a-z]?[0-9]*//i; >+ $outp =~ s/^file[0-9]*//i; >+ my $decoded_file = decode_base64($outp); >+ if ($decoded_file =~ /[[:^ascii:]]/) { >+ $decoded_file = $outp; >+ } >+ print ($decoded_file); > $outp = ""; > } > return -1;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 132344
: 94235 |
94236