From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wopr.sciops.net ([216.126.196.60]) by ur; Fri Jun 9 12:30:57 EDT 2017 Received: (qmail 85809 invoked by uid 1001); 9 Jun 2017 09:30:53 -0700 Date: Fri, 9 Jun 2017 09:30:53 -0700 From: Kurt H Maier To: 9front@9front.org Subject: Re: [9front] webpaste: fail if file unreadable Message-ID: <20170609163053.GB81475@wopr> Mail-Followup-To: 9front@9front.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: strategy-aware AJAX CMS STM app API On Fri, Jun 09, 2017 at 02:59:14PM +0000, raiz@firemail.cc wrote: > diff -r 7afc70a22b58 rc/bin/webpaste > --- a/rc/bin/webpaste Thu Jun 08 09:08:59 2017 +0200 > +++ b/rc/bin/webpaste Fri Jun 09 17:57:11 2017 +0300 > @@ -3,6 +3,8 @@ > file=/fd/0 > if not > file=$1 > +test -r $file || echo unreadable file && exit unreadable > + > hpost -u http://okturing.com -p / a_body@$file submit:submit fake:fake > a_func:add_post url: | > grep -e '\/body\"' | > sed 1q | sed 's/^.*href=\"//g; s/body\".*$/body/g' Shouldn't this test be in hpost? khm