JagandeepBrar / lunasea

Self-hosted software controller built using Flutter
https://www.lunasea.app
GNU General Public License v3.0
1.28k stars 63 forks source link

[Bug] Images Don't Load with Invalid TLS Certificates #216

Closed JagandeepBrar closed 4 years ago

JagandeepBrar commented 4 years ago

Describe the Bug When disabling Strict TLS Validation to use an invalid-CA certificate, images will fail to load throughout LunaSea that are fetched from the services.

To Reproduce Setting the strict SSL validation to false when using an CA-invalid SSL certificate.

Versions All versions.

Additional context

This occurs because the network image caching package that I use, flutter_advanced_networkimage does not allow creating a customized network adapter to be used for the request. A customized network adapter is needed in order to bypass the error thrown for invalid certificates.

The ideal solution here would be to write a customized image caching solution for LunaSea, but this would require a relatively large amount of development time.

Another possible package to vet and investigate: cached_network_image

JagandeepBrar commented 4 years ago

The issue with the custom headers has been resolved with https://github.com/LunaTools/LunaSea/commit/1a07b8518f4e5564936fee707bb36e590aa1128b and will be live into the next TestFlight release.

The issue will remain open while images do not load with invalid SSL certificates.

JagandeepBrar commented 4 years ago

Strict TLS has now been disabled at a global level, with all of the individual toggles removed. With this, images will now load regardless of the validity of the TLS certificate.

https://github.com/CometTools/LunaSea/tree/2cab6a2b65659774481c9d8721e8e3e0f448560d