Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 674750

Summary: app-text/wgetpaste-2.28-r1 generates incorrect URLs
Product: Gentoo Linux Reporter: Jakub Hrbek <werifgx>
Component: Current packagesAssignee: Maxim Koltsov (RETIRED) <maksbotan>
Status: RESOLVED WONTFIX    
Severity: normal CC: zlogene
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Input for reproduction
copy of /usr/bin/wgetpaste

Description Jakub Hrbek 2019-01-07 04:51:36 UTC
If i use `wgetpaste -l bash` on https://pastebin.com/raw/vNGc9vzw it generates  `https://codeload.github.com/PhoenicisOrg/phoenicis/tar.gz/v9999`

https://i.imgur.com/CTIfBhX.png 

Reproducable: Always
Comment 1 Jakub Hrbek 2019-01-07 04:52:04 UTC
Created attachment 560160 [details]
Input for reproduction
Comment 2 Jakub Hrbek 2019-01-07 04:54:39 UTC
Video: https://youtu.be/uV4A4vd-ZxQ
Comment 3 Jakub Hrbek 2019-01-07 04:55:07 UTC
Created attachment 560162 [details]
copy of /usr/bin/wgetpaste
Comment 4 Jakub Hrbek 2019-01-07 04:58:28 UTC
I've commented out line 494 in Attachment #2 [details] on my system to prevent `Your ${2}paste can be seen here: " >&2` from spamming in output.. Not sure if it's relevant.
Comment 5 Jakub Hrbek 2019-01-07 04:59:32 UTC
EDIT: if line 494 is uncommented the output is:

Your paste can be seen here: https://codeload.github.com/PhoenicisOrg/phoenicis/tar.gz/v9999
Comment 6 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-01-07 10:18:10 UTC
Why gentoo bug was created rather than debug and send this upstream?

Wgetpaste has greedy regular expression at the line 564 in the get_url() function which is:

sed -n -e 's|^.*Location: \(https\{0,1\}://[^ ]*\).*$|\1|p' <<< "$*"

so this maches 

# Location: https://codeload.github.com/PhoenicisOrg/phoenicis/tar.gz/v9999 [following]

line 91 here:

https://paste.pound-python.org/show/dJnhReaoi4NoSvhsPfmk/

But I am sure we do not want to have a distro fix, so please report upstream.
Comment 7 Jakub Hrbek 2019-01-07 12:02:04 UTC
(In reply to Mikle Kolyada from comment #6)
> Why gentoo bug was created rather than debug and send this upstream?

I saw yours and Maksbotan's name in 'Maintainers' and i though that it's gentoo package? Assuming that it's not present on other distros and that homepage (http://wgetpaste.zlin.dk/) is just full of download links? 

Can you share contact on upstream? I'm unable to find any https://duckduckgo.com/?q=wgetpaste&t=h_&ia=web

> Wgetpaste has greedy regular expression at the line 564 in the get_url()
> function which is:
> 
> sed -n -e 's|^.*Location: \(https\{0,1\}://[^ ]*\).*$|\1|p' <<< "$*"
> 
> so this maches 
> 
> # Location: https://codeload.github.com/PhoenicisOrg/phoenicis/tar.gz/v9999
> [following]
> 
> line 91 here:
> 
> https://paste.pound-python.org/show/dJnhReaoi4NoSvhsPfmk/
> 
> But I am sure we do not want to have a distro fix, so please report upstream.

Noted, thanks for info.
Comment 8 nvinson234 2019-01-07 14:56:08 UTC
The status on this bug is incorrect.  It should have been marked as a duplicate of 634632.
Comment 9 nvinson234 2019-01-07 14:59:43 UTC
(In reply to Jakub Hrbek from comment #7)
> (In reply to Mikle Kolyada from comment #6)
> > Why gentoo bug was created rather than debug and send this upstream?
> 
> I saw yours and Maksbotan's name in 'Maintainers' and i though that it's
> gentoo package? Assuming that it's not present on other distros and that
> homepage (http://wgetpaste.zlin.dk/) is just full of download links? 
> 
> Can you share contact on upstream? I'm unable to find any
> https://duckduckgo.com/?q=wgetpaste&t=h_&ia=web

https://github.com/zlin/wgetpaste

> 
> > Wgetpaste has greedy regular expression at the line 564 in the get_url()
> > function which is:
> > 
> > sed -n -e 's|^.*Location: \(https\{0,1\}://[^ ]*\).*$|\1|p' <<< "$*"
> > 
> > so this maches 
> > 
> > # Location: https://codeload.github.com/PhoenicisOrg/phoenicis/tar.gz/v9999
> > [following]
> > 
> > line 91 here:
> > 
> > https://paste.pound-python.org/show/dJnhReaoi4NoSvhsPfmk/
> > 
> > But I am sure we do not want to have a distro fix, so please report upstream.
> 
> Noted, thanks for info.
Comment 10 Jakub Hrbek 2019-01-07 22:26:23 UTC
Thanks(In reply to nvinson234 from comment #9)
> (In reply to Jakub Hrbek from comment #7)
> https://github.com/zlin/wgetpaste

Thanks!
Comment 11 Jakub Hrbek 2019-01-07 22:29:01 UTC
Note: Recommends adding a link on https://github.com/zlin/wgetpaste to an ebuild. Current homepage is not helpful alike for reporting bugs.