Commit graph

80 commits

Author SHA1 Message Date
Shaun Amott
bfac757e9e - Send "utf-8" as the charset for the page to match what we actually
output.

- Properly decode MIME parts from their source charset (in the case of
  a single-part message, we haven't got the relevant headers thanks to
  GNATS. Sigh.)

- Don't strip the trailing newline on MIME parts, as this breaks encoded
  Quoted-Printable newlines (if there happened to be one at the end).
2011-07-23 02:42:59 +00:00
Shaun Amott
f2ea3e0f43 - Elide inline HTML MIME parts when there is a plaintext part available.
- Don't display S/MIME signatures [1]; reduce to the attachment link.

- Make the self-referencing-URL removal regex case insensitive.

Suggested by:	gavin [1]
2011-07-22 23:38:59 +00:00
Shaun Amott
37f41bb769 Content-size value shouldn't be quoted. 2011-07-21 14:31:41 +00:00
Shaun Amott
eeb78bf5c8 Don't output the Content-type header twice.
Submitted by:	gavin
2011-07-21 12:37:17 +00:00
Shaun Amott
37f918722e Fix header output (extra newline required). 2011-07-21 03:27:58 +00:00
Shaun Amott
1e10341242 Another fix: print -> printf (header wasn't being output correctly) 2011-07-21 03:06:06 +00:00
Shaun Amott
6049f21bd8 Fix URL used for self-referencing links. 2011-07-21 02:44:20 +00:00
Shaun Amott
e906e0ff03 Some small fixes that I overlooked. 2011-07-21 02:09:02 +00:00
Shaun Amott
d10065df76 Run variables through quotemeta as an extra security layer to appease
Perl's taint mode.
2011-07-21 01:25:28 +00:00
Shaun Amott
ac6b2c914e Make sure the local modules can be found. 2011-07-21 01:07:13 +00:00
Shaun Amott
defc87e9c4 Introducing the 3rd generation PR viewer.
This is a significant improvement over the previous version, with more
robust patch handling, better encoding/charset handling, numerous
long-overdue bug fixes and a generally more maintainable codebase.
2011-07-20 22:23:23 +00:00
Remko Lodder
48ed9b9fc1 Correct display of BASE64 attachements.
PR:		116594 [1], 132344 [2]
Submitted by:	edwin [1], David Horn [2]
Patch from:	gavin
2009-11-15 18:40:26 +00:00
Remko Lodder
3be0f136b2 Fix raw output of uu encoded files.
PR:		116257
Submitted by:	edwin
Patch by:	gavin
2009-11-15 16:28:32 +00:00
Remko Lodder
009ccbe65b Properly treat quoted-printable line continuations
PR:		www/127898
Submitted by:	Eygene Ryabinkin <rea-fbsd at codelabs dot ru>
Tested by:	gavin
2009-11-15 12:08:18 +00:00
Simon L. B. Nielsen
a6fe60fd45 Add a note about what query-pr.web does. 2009-09-29 19:45:37 +00:00
Wolfram Schneider
a64554027d enable OpenSearch plugins 2008-09-22 19:13:42 +00:00
Shaun Amott
af21668f45 Catch patches attached via the web submission form (prior to the last update.) 2008-01-26 15:53:55 +00:00
Shaun Amott
1ee594897f Another attempt at giving the browser a real patch name to work with,
since the MIME filename is ignored.
2007-12-17 17:46:05 +00:00
Simon L. B. Nielsen
09972e0a9b - Send a patch file-name in the HTTP header via the
Content-Disposition header.
- When downloading/referring to a particular patch embed the patch
  number with the PR instead of using two different CGI variables.
  This means that there aren't "&" in the patch URL's anymore which
  makes things simpler for sh(1) like shells, by not requiring quoting
  of URLs when using a command line tool, such as fetch(1), to
  download patches.
- In HTML-ifying of URL's, handle when a URL contains a PR like string
  which can e.g. be seen in PR www/113071.
- Add a comment about how to test script via the command line.

Submitted by:	edwin, shaun
PR:		www/113071
2007-06-12 19:38:30 +00:00
Daniel Gerzo
62076a45d1 Merge query-by-number and multi-field query forms.
This work included:

- move a few functions out of query-pr-summary.cgi into a new file -
  query-pr-lib.pl, which now provides a procedure to display forms
- include query-pr-lib.pl in both query-pr.cgi and query-pr-summary.cgi
  scripts

PR: www/35647
Approved by: trhodes (mentor), keramida (mentor)
Silence from: www@
2007-01-10 17:47:39 +00:00
Shaun Amott
36b304ee28 - Add MIME, base64 and quoted-printable support.
- Don't over-pad patches in viewer.
- URL-ifiy PR references.
- Misc fixes.

Approved by:	simon
2006-12-09 15:46:06 +00:00
Shaun Amott
5e5c996a1b - Differentiate between "busy" and "no PRs matched", and display the
appropriate message.
- Add some logic to deal with manually inserted / unexpected text within
  the Audit-Trail.
- Extend URL regex.

Approved by:	pav
2006-11-27 17:12:50 +00:00
Simon L. B. Nielsen
1fd366d976 Use the locked version of the query-pr program to avoid running
www.FreeBSD.org out of memory.
2006-11-03 12:32:59 +00:00
Yaroslav Tykhiy
d01457cf1d Decode query components. Without this, one
couldn't specify full PR ID, e.g., bin/12345, in the
"PR number" field of the web form because the slash
was encoded as %2F by many browsers.  Of course,
decoding the query is a must for a cgi in general.
2006-10-26 11:13:34 +00:00
Daniel Gerzo
f49984172c - Let this script generate valid XHTML
- Also allow queries like query-pr.cgi?q= and query-pr.cgi?cat/num
- Fix comment
- Display query form when no results found
- Allow some other characters to be part of the URL [1]

PR: www/103628 [1]
Reviewed by: simon, remko
Approved by: keramida (mentor)
2006-10-11 21:02:58 +00:00
Simon L. B. Nielsen
12ce8b2a67 Note which port gives us Convert::UU in a comment. 2006-09-23 14:02:27 +00:00
Shaun Amott
eaea0ff8ac Fix a few bugs in the processing of the Audit-Trail:
- A multi-line mail header wrapping on a space wasn't handled correctly.
- My attempt at finding the end of patches with no delimiter inside
  replies wasn't working in some cases; I've disabled it for now.
2006-09-19 13:20:42 +00:00
Shaun Amott
2212fec61a Introducing the new GNATS web interface.
This was written from scratch, and offers numerous enhancements over the
old script; notably:

- Patches are parsed, coloured, uudecoded, and downloadable.
- Cleaner, clearer layout.
- Easier-to-read Audit-Trail.

Reviewed by:	freebsd-www (well, I tried...)
Approved by:	simon
2006-09-18 21:25:38 +00:00
Ceri Davies
5183913e78 Back out the highly unpopular email address blocking. 2005-12-04 12:50:17 +00:00
Bill Fenner
a7613f7a01 Turn the entered code uppercase before looking it up in the database,
to permit entering the code in lowercase (since the generator doesn't
 generate lowercase letters).
Use a relative url to querypr-code.cgi so that mirrors (and test boxes)
 can use the query-pr cgis unmodified.
2005-11-16 23:35:57 +00:00
Bill Fenner
adf473387a End the paragraph before the form, to make it valid xhtml again. 2005-11-09 21:38:31 +00:00
Ceri Davies
34c9d5f217 Remove some debug code. 2005-11-07 10:43:19 +00:00
Ceri Davies
31dfff3531 Don't show the email address of the Originator by default.
There is a link provided whereby users can enter a code to
see the email addresses.

Kind-of requested by:	core
2005-11-06 22:29:45 +00:00
Ceri Davies
5fa4a3cc7b Remove an unused array. 2005-11-06 22:13:05 +00:00
Ceri Davies
77b1af42c7 Print a link to query-pr-summary.cgi at the end of every page (whether
that be an error or success), as it's not currently easy to find your
way back there.  Suggested in:

PR:		www/88473
Submitted by:	Roman Neuhauser <neuhauser at sigpipe dot cz>
2005-11-04 10:25:42 +00:00
Remko Lodder
1c40c291d1 Fix a problem spotted by pav. The Originator field got split into two lines
making it hard to copy/paste the originator field for PR issues.
Also make query-pr.cgi xhtml compliant.

Submitted by:		Daniel Gerzo <danger at rulez dot sk>
2005-09-18 19:32:24 +00:00
Remko Lodder
cd96331876 Another go at making our cgi scripts xhtml compliant.
Submitted by:		Daniel Gerzo <danger at rulez dot sk>
2005-09-17 15:48:23 +00:00
Ceri Davies
c03b1a829e Restore r1.40 which was accidentally backed out in the last commit.
Discussed with:	jcamou
2005-08-11 11:47:01 +00:00
Jesus R. Camou
ea89921696 o Add `Query PR' button.
o Clean some tagging.

PR:		www/82379
Noticed by:	Ed Schouten <ed@fxq.nl>
Submitted by:	Daniel Gerzo <danger@rulez.sk>
Reviewed by:	simon
Approved by:	trhodes (mentor)
2005-08-11 01:34:53 +00:00
Remko Lodder
2802fc8f32 Add an space between the PR number and the colon.
Requested by:	pav
2005-07-14 15:02:38 +00:00
Ceri Davies
9cb8dd0d21 Bring CSS to the CGI scripts. 2005-07-14 11:08:54 +00:00
Giorgos Keramidas
aba859cb13 Change the default recipient address that is recommended at the end
of problem report viewed through the web interface of query-pr to
bug-followup@freebsd.org to reduce the diffs from the problem-reports
articles and the potential for confusing our users.

Submitted by:	Julien Gabel <jpeg@thilelli.net>
2005-04-14 12:26:28 +00:00
Ceri Davies
60c26b8713 Be more relaxed about what we're expecting query-pr to be called until
this gets sorted out.
2004-11-26 21:57:23 +00:00
Ceri Davies
f08bb99ab7 Add an embryonic Gnats.pm that will collect variables and subroutines
related to querying GNATS together, in order to aid with the upgrade to
GNATS 4.

Switch over dosendpr.cgi and query-pr.cgi to use it.
query-pr-summary.cgi to follow.
2004-02-16 16:57:10 +00:00
Ceri Davies
750c390701 Correct some problems formatting links in query-pr.cgi's output.
The patch is from [1], and the problem was reported in both of the
following

PR:		www/51607, www/53530 [1]
Submitted by:	anholt, eik [1]
2003-11-12 20:58:13 +00:00
Ceri Davies
20f599f17e The code in the last commit causes Internal Server Errors when executed;
correct this.
2003-06-09 14:58:00 +00:00
Ceri Davies
8456cf94b7 Complete the error reporting fix that revision 1.32 started:
If gaining the lock fails, then catch that error and explain it to the user.
2003-06-08 20:59:51 +00:00
Ceri Davies
2cdb6fc9e0 We now have sparc64 and ia64 categories in gnats, so update the regex that
searches for possible PR references for urlification.
2003-05-21 18:57:10 +00:00
Ceri Davies
a666faaa33 The output from query-pr.web will never match /^query-pr:/, as we call it
as query-pr.real; fix error reporting by taking this into account.
2003-05-21 18:48:51 +00:00
Dag-Erling Smørgrav
59990dbf67 Speed up PR lookup by about 100% by ignoring the "confidential" field,
which we have never honored anyway.
2003-04-10 09:29:21 +00:00