HalosGhost / pbpst

A command-line libcurl C client for pb deployments
GNU General Public License v2.0
44 stars 9 forks source link

Passing --provider and URL without the '/' suffix gives an invalid link #70

Closed tmplt closed 7 years ago

tmplt commented 7 years ago

Present in e8a4bfb368d8e26bed8dd0c8495007ab6e72fdd0.

The shortid seems to be appended to the --provider string, so if the provider isn't suffixed with '/', an invalid link is printed.

Example:

$ pbpst -Sf file.png --provider=https://ptpb.pw
https://ptpb.pw<shortid> # invalid

Expected:

$ pbpst -Sf file.png --provider=https://ptpb.pw
https://ptpb.pw/<shortid> # valid
HalosGhost commented 7 years ago

Thanks for the heads-up. There's already a code-block to ensure that the provider gets a trailing slash, I imagine it is being skipped over in the case where the user has passed a provider, so all this should require is to make sure that verification is run regardless.

HalosGhost commented 7 years ago

via 3d267131ea311be2beef428121caefbef25259df