Szwendacz99 / BookStack-Python-exporter

Customizable script for exporting notes from BookStack through API. Export Pages, Chapters, Books, attachments and images.
MIT License
22 stars 3 forks source link

Ignoreselfsigned #6

Open apitamy opened 1 month ago

apitamy commented 1 month ago

Small change to bypass errors with self signed certificates.

Szwendacz99 commented 1 month ago

Ignoring TLS certificates validation is generally not recommended, but can have use in some scenarios, like testing. Therefore I can allow it, but it should not be default. I would say the best approach is to add another boolean parameter to the parser (other boolean parameters are --dont-export-attachments, --force-update-files, etc..), that will enable those lines:

ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

only if someone intentionally add that parameter.

apitamy commented 1 month ago

makes total sense. I'll work on that but it may take a bit. Thanks for input!