bookwyrm icon indicating copy to clipboard operation
bookwyrm copied to clipboard

Check HTTP status codes

Open willhoh opened this issue 2 years ago • 4 comments

This will check that http status code of the file link url is between 200 and 399. It should fix #1831

willhoh avatar Feb 06 '22 08:02 willhoh

Can someone explain to me what the error means that was found during the checks?

I also typed ./bw-dev pytest bootwyrm and only get

+ case "$CMD" in
+ execweb pytest --no-cov-on-fail bookwyrm
+ docker-compose exec web pytest --no-cov-on-fail bookwyrm

what am i doing wrong?

willhoh avatar Feb 06 '22 16:02 willhoh

If you merge main into your branch, it should get the tests working again. Sorry for the confusion!

mouse-reeve avatar Feb 18 '22 00:02 mouse-reeve

Sorry to leave you hanging for so long on this, things have been hectic for me, but I haven't forgotten about you! This PR is raising a security alert because it queries a user-provided url. I don't think it's a big issue because it's a head request and nothing is being done with the results. But I will probably pass it through the function that verifies urls for other types of requests, just for good measure -- that's something I can do separately once this is ready to merge.

I think if you run black, it should resolve the lingering whitespace issues, it looks like those are just trailing whitespace issues.

mouse-reeve avatar Mar 06 '22 03:03 mouse-reeve

I will deal with these merge conflicts! They're entirely on me

mouse-reeve avatar Mar 17 '22 00:03 mouse-reeve