felixhageloh / uebersicht

ˈyːbɐˌzɪçt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Version 1.6.72 Passing Unfiltered TLS Warnings via Node, Breaking Some Widgets

jetblackrx89 opened this issue · comments

For some reason, using this weather widget is fine on version 1.6.69, but on 1.6.72, it breaks with the below TLS error.

https://github.com/felixhageloh/weather-widget

(node:79334) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use node-x64 --trace-warnings ... to show where the warning was created)

I'm not sure if this is really an issue or not. The fix is pretty easy and requires changing line 4 of get-weather.js to:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = 1;

I guess the main ask here is: Is error handling working as expected? It's weird that node isn't complaining about this on older versions of Ubersicht. The warning text is in turn causing the widget to get an unexpected reply that the widget dev doesn't provide any scenario to catch, breaking its ability to display data, even though the warning via node was followed by looks like valid JSON data (I snipped that out for brevity). Were warnings suppressed before to avoid this?