Skip to content
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

Add --insecure option #437

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Pokechu22
Copy link
Contributor

This option is needed for https://wiki.education.minecraft.net/api.php, which (in addition to broken routing breaking https://wiki.education.minecraft.net/Main_Page but allowing https://wiki.education.minecraft.net/index.php?title=Main_Page) has an expired certificate. It's now possible to run python2 -u dumpgenerator.py --xml --images --api https://wiki.education.minecraft.net/api.php --insecure.

I also fixed a bug where the "XML export on this wiki is broken, quitting." message wasn't written to errors.log. This can be seen via python2 -u dumpgenerator.py --xml --images --api https://ja.rodovid.org/api.php --retries 1.

@nemobis
Copy link
Member

nemobis commented May 29, 2023

I understand this is sometimes necessary but I'm not a huge fan, especially for dumps made for upload to archive.org. How do you use this? I forgot, isn't there an environment variable allowing people to do this anyway?

@Pokechu22
Copy link
Contributor Author

I think the message in errors.log is enough to cover integrity concerns, as it does make it obvious that this was in use. And, wikis where the certificate is broken are particularly at-risk and thus important to save IMO.

How do you use this?

You just add --insecure to the arguments you pass to dumpgenerator.py. I didn't expose it in any of the frontend tools (as I personally don't use them).

I forgot, isn't there an environment variable allowing people to do this anyway?

I think openssl(?) has some environment variables it uses, but that's more for supported TLS versions instead of certificate validation. That was something I looked into in the past as well but I believe I never got it to work properly.

@nemobis
Copy link
Member

nemobis commented May 29, 2023

I meant, how do you personally use this? Was it for specific domains you archived?

If it's too difficult to do with environment variables, I guess it's ok to provide the option. In the urllib3 docs I only find

Finally, you can suppress the warnings at the interpreter level by setting the PYTHONWARNINGS environment variable or by using the -W flag.

https://urllib3.readthedocs.io/en/stable/advanced-usage.html#tls-warnings

@Pokechu22
Copy link
Contributor Author

Yeah, I only use it for specific domains that I confirmed ahead of time had content but also had an expired certificate; it's not something I have enabled all the time. https://wiki.education.minecraft.net/api.php is the main example, though there have been a few others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants