New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scanning an HTTPS mirror doesn't handle redirect #174

Open
rhertzog opened this Issue Apr 6, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@rhertzog
Copy link

rhertzog commented Apr 6, 2018

I have two mirrorbrain database for the same set of mirrors, but one is configured with "http" URLs and the other with "https" URLs. I have one specific mirror which emits HTTP redirects (302) for large files due to specific caching rules and this is handled fine in the "http" case but it's causing troubles in the "https" case.

Here's what I see in the https case:

$ mb -b kali-images-https scan ftp.acc.umu.se
Fri Apr  6 20:47:54 2018 ftp.acc.umu.se: starting
Fri Apr  6 20:47:54 2018 ftp.acc.umu.se: total files before scan: 53
Fri Apr  6 20:47:56 2018 ftp.acc.umu.se: Error 302 occured
ftp.acc.umu.se: warning: kali-2017.2/kali-linux-2017.2-i386.iso cannot be delivered via HTTP! Skipping
Fri Apr  6 20:47:56 2018 ftp.acc.umu.se: Error 302 occured
ftp.acc.umu.se: warning: kali-2017.2/kali-linux-kde-2017.2-amd64.iso cannot be delivered via HTTP! Skipping
[...]

And for the http case it handles the redirect properly:

$ mb -b kali-images scan ftp.acc.umu.se
Fri Apr  6 20:48:49 2018 ftp.acc.umu.se: starting
Fri Apr  6 20:48:49 2018 ftp.acc.umu.se: total files before scan: 81
Fri Apr  6 20:48:50 2018 ftp.acc.umu.se: [RECURSE] Moved to other http location, recursing scan...
Fri Apr  6 20:48:50 2018 ftp.acc.umu.se: [RECURSE] Moved to other http location, recursing scan...
[...]

rhertzog added a commit to rhertzog/mirrorbrain that referenced this issue Apr 6, 2018

@rhertzog rhertzog referenced a pull request that will close this issue Apr 6, 2018

Open

scanner: handle recursion to HTTPS URLs in large file check #175

@rhertzog

This comment has been minimized.

Copy link

rhertzog commented Apr 6, 2018

I looked into the code and it was an easy fix so I submitted the fix in the pull request referenced just above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment