From marius.nuennerich@gmx.net Wed Jul 13 17:45:42 2005 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CCEF16A41C for ; Wed, 13 Jul 2005 17:45:42 +0000 (GMT) (envelope-from marius.nuennerich@gmx.net) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id D568A43D46 for ; Wed, 13 Jul 2005 17:45:41 +0000 (GMT) (envelope-from marius.nuennerich@gmx.net) Received: (qmail invoked by alias); 13 Jul 2005 17:45:39 -0000 Received: from p5083A8B0.dip0.t-ipconnect.de (EHLO olaf.hackerzberg.local) [80.131.168.176] by mail.gmx.net (mp026) with SMTP; 13 Jul 2005 19:45:39 +0200 Message-Id: <1121276739.0@olaf.hackerzberg.local> Date: Wed, 13 Jul 2005 19:45:39 +0200 From: "Marius Nuennerich" To: "FreeBSD gnats submit" Cc: marius.nuennerich@gmx.net Subject: Improvement to the GNATS webinterface X-Send-Pr-Version: gtk-send-pr 0.4.6 X-GNATS-Notify: >Number: 83397 >Category: www >Synopsis: [patch] Improvement to the GNATS webinterface >Confidential: no >Severity: non-critical >Priority: low >Responsible: ceri >State: closed >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jul 13 17:50:13 GMT 2005 >Closed-Date: Sat Oct 07 18:08:39 GMT 2006 >Last-Modified: Sat Oct 7 18:10:25 GMT 2006 >Originator: Marius Nuennerich >Release: >Organization: >Environment: >Description: With http://www.freebsd.org/send-pr.html it isn't possible to send most patches in the "fix" textarea, because tabs are replaced with spaces. The attached patch adds the possiblity to upload files, which get attached to the PR in the fix section. Be aware that I have never coded perl before, so it is likely the patch isn't working out of the box. I also had no chance to test and I'm not sure if this is secure! >How-To-Repeat: >Fix: --- patch begins here --- diff -ru www.bak/en/cgi/dosendpr.cgi www/en/cgi/dosendpr.cgi --- www.bak/en/cgi/dosendpr.cgi Wed Jul 13 17:47:04 2005 +++ www/en/cgi/dosendpr.cgi Wed Jul 13 19:25:20 2005 @@ -153,6 +153,14 @@ if ($blackhole_err) { $pr .= "X-REMOTE_ADDR-Is-Open-Proxy: Maybe\n"; } + +{ + use bytes; + if (length($cgi_bin{'patch'}) > 1048576) { + die "patchfile too big!"; + } +} + $pr .= "X-Send-Pr-Version: www-2.3\n\n" . ">Submitter-Id:\t$cgi_data{'submitterid'}\n" . ">Originator:\t$cgi_data{'originator'}\n" . @@ -167,9 +175,10 @@ ">Environment:\t$cgi_data{'environment'}\n" . ">Description:\n$cgi_data{'description'}\n" . ">How-To-Repeat:\n$cgi_data{'howtorepeat'}\n" . - ">Fix:\n$cgi_data{'fix'}\n"; + ">Fix:\n$cgi_data{'fix'}\n" . + "$cgi_data{'patch'}\n"; -# remove any carrage returns that appear in the report. +# remove any carriage returns that appear in the report. $pr =~ s/\r//g; if (open (SUBMIT, "|$submission_program")){ diff -ru www.bak/en/send-pr.sgml www/en/send-pr.sgml --- www.bak/en/send-pr.sgml Wed Jul 13 17:47:09 2005 +++ www/en/send-pr.sgml Wed Jul 13 19:29:18 2005 @@ -38,7 +38,8 @@ the bugbusters team for submission into the bug tracking system.

-
+ @@ -111,6 +112,9 @@ :

+ + : +