johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.16k stars 286 forks source link

OPDS: allow bypassing TLS certificate errors #680

Open josesj opened 3 years ago

josesj commented 3 years ago

When I try to access a self hosted catalog with a self signed certificate I get the following error:

(com.github.johnfactotum.Foliate:16695): Gjs-WARNING **:   
16:36:42.456: JS ERROR: Error: TypeError: Unacceptable TLS certificate
_handleAction@resource:///com/github/johnfactotum/Foliate/js/opds.js:485:50
OpdsClient/<@resource:///com/github/johnfactotum/Foliate/js/opds.js:470:18
main@resource:///com/github/johnfactotum/Foliate/js/main.js:474:24
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
@/usr/bin/foliate:9:17

May be useful have an option to avoid SSL verification?

itprojects commented 3 years ago

@josesj Although giving options is great, when possible, are sure this website is safe to download from?

Are you willing to share URL?

josesj commented 3 years ago

@itprojects Yes, it's my own server. I'm using a docker image of calibre-web behind a traefik reverse proxy for hosting my collection of purchased ebooks. I know using SSL on my own server, inside my own network its a little bit overkill, but...

I think can be an option or a dialog with a warning message.

itprojects commented 3 years ago

It would be better and quicker to do it with a toggle switch in the preferences.

Otherwise, every time you try to download from an ordinary http website, the download will have to:

  1. Remember the settings before the download.
  2. Stop the network activity.
  3. Ask the user a question.
  4. Discard or re-apply the remembered settings.

Easier to look for an internal setting, or error out regularly, due to https-only setting.

Meanwhile you may have to manually download and open them.