Bug 83397

Summary: [patch] Improvement to the GNATS webinterface
Product: Documentation Reporter: Marius Nuennerich <marius.nuennerich>
Component: Books & ArticlesAssignee: Ceri Davies <ceri>
Status: Closed FIXED    
Severity: Affects Only Me CC: marius.nuennerich
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch none

Description Marius Nuennerich 2005-07-13 18:50:13 UTC

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!
Comment 1 Ceri Davies freebsd_committer freebsd_triage 2005-07-14 11:13:29 UTC
Responsible Changed
From-To: freebsd-www->ceri

I very much like the idea; what do we need to add to send-pr.sgml to 
make the form work properly?
Comment 2 Ceri Davies 2005-07-14 15:55:20 UTC
On Thu, Jul 14, 2005 at 04:44:00PM +0200, Marius Nuennerich wrote:
> > Synopsis: [patch] Improvement to the GNATS webinterface
> 
> > Responsible-Changed-From-To: freebsd-www->ceri
> > Responsible-Changed-By: ceri
> > Responsible-Changed-When: Thu Jul 14 10:13:29 GMT 2005
> > Responsible-Changed-Why: 
> > I very much like the idea; what do we need to add to send-pr.sgml to
> > make the form work properly?
> 
> Hello,
> 
> aren't the lines I added to send-pr.sgml (included in the patch) enough?


I'm sorry; I thought that I'd read that patch properly but was obviously
mistaken.

Ceri
-- 
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.			  -- Einstein (attrib.)
Comment 3 Ceri Davies 2005-11-29 17:34:07 UTC
On Wed, Jul 13, 2005 at 07:45:39PM +0200, Marius  Nuennerich wrote:

> +++ 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!";
> +      }
> +}

This was all looking good until I ran it on www; we don't have a recent
version of Perl on there, so "use bytes" doesn't work.  Is there
something equivalent for 5.00503?  If not, I guess we could just do
without it.

Note that the question isn't necessarily directed at you; anyone who
knows please speak up.

Cheers,

Ceri
-- 
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.			  -- Einstein (attrib.)
Comment 4 Marius Nuennerich 2005-12-20 01:39:59 UTC
On Tue, 29 Nov 2005 17:34:07 +0000
Ceri Davies <submonkey@gmail.com> wrote:

> On Wed, Jul 13, 2005 at 07:45:39PM +0200, Marius  Nuennerich wrote:
> 
> > +++ 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!";
> > +      }
> > +}
> 
> This was all looking good until I ran it on www; we don't have a recent
> version of Perl on there, so "use bytes" doesn't work.  Is there
> something equivalent for 5.00503?  If not, I guess we could just do
> without it.

I think we should just omit the use bytes and lower the maximum size.

+      if (length($cgi_bin{'patch'}) > 102400) {
+            die "patchfile too big!";
+      }

This should work and 100KB ought to be enough for anybody ;)

Maybe there should be a hint next to the label for the new input field
stating the maximum size.

regards
Marius
Comment 5 Marius Nuennerich 2006-09-26 12:12:24 UTC
Hi

according to this
> http://bsdblogs.droso.org/simon/2006/09/25/skyfreebsdorg-step-4-and-more/
Perl should be up to date now :)

regards
Marius
Comment 6 Ceri Davies freebsd_committer freebsd_triage 2006-10-07 19:06:30 UTC
State Changed
From-To: open->closed

This turned out to be more complicated than we had thought, but it's 
done now, yay!
Comment 7 dfilter service freebsd_committer freebsd_triage 2006-10-07 19:08:08 UTC
ceri        2006-10-07 18:08:04 UTC

  FreeBSD doc repository

  Modified files:
    en                   send-pr.sgml 
    en/cgi               dosendpr.cgi 
  Log:
  Allow patches to be attached via the web page.
  Thanks to Marius Nuennerich for submitting the idea and for never giving
  up on nagging me about it.
  
  PR:             www/83397
  
  Revision  Changes    Path
  1.27      +33 -2     www/en/cgi/dosendpr.cgi
  1.54      +13 -2     www/en/send-pr.sgml
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"