crycode-de / ioBroker.ds18b20

ioBroker adapter for DS18B20 1-wire temperature sensors
MIT License
6 stars 8 forks source link

Remote Client Setup Fails When Using Admin Auth #105

Closed EvilEls closed 1 year ago

EvilEls commented 1 year ago

When the Admin adapter uses Auth, the wget request fails and retrieves the Admins login page.

$ wget -O remote-client-setup.js --no-check-certificate https://192.168.0.30:8081/adapter/ds18b20/remote-client-setup.js
--2022-11-17 23:24:37--  https://192.168.0.30:8081/adapter/ds18b20/remote-client-setup.js
Connecting to 192.168.0.30:8081... connected.
WARNING: The certificate of ‘192.168.0.30’ is not trusted.
WARNING: The certificate of ‘192.168.0.30’ doesn't have a known issuer.
The certificate's owner does not match hostname ‘192.168.0.30’
HTTP request sent, awaiting response... 302 Found
Location: /index.html?login&href=%2Fadapter%2Fds18b20%2Fremote-client-setup.js [following]
--2022-11-17 23:24:37--  https://192.168.0.30:8081/index.html?login&href=%2Fadapter%2Fds18b20%2Fremote-client-setup.js
Reusing existing connection to 192.168.0.30:8081.
HTTP request sent, awaiting response... 200 OK
Length: 2594 (2.5K) [text/html]
Saving to: ‘remote-client-setup.js’

remote-client-setup.js   100%[==================================>]   2.53K  --.-KB/s    in 0.001s

2022-11-17 23:24:37 (1.65 MB/s) - ‘remote-client-setup.js’ saved [2594/2594]

$ nano remote-client-setup.js
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="admin - ioBroker"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="stylesheet" href="./css/leaflet.css"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" onerror="setTimeout(function(){window.location.reload()}, 5000)" src="./lib/js/socket.io.js"></script><script type="text/javascript" src="./lib/js/sparkline.js"></script><title>Admin</title><script>window.loginHideLogo="false",window.loginMotto="",window.login="true",window.loginLogo="",window.loginLink="",window.loginTitle="",window.loginBackgroundColor="inherit",window.loginBackgroundImage="",window.vendorPrefix="",window.disableDataReporting=true,window.loadingBackgroundColor="",window.loadingBackgroundImage

🚩 Admin adapters auth has to be disabled for this step and can be re-enabled afterwards.

Pls add this to the docs.

crycode-de commented 1 year ago

Thank you for the information about this issue. Disabling auth (even for a short time) should not be recommended in my opinion. I'll have a look at it and try to find a solution wich doesn't require disabling auth.

crycode-de commented 1 year ago

This issue should be fixed in release 1.6.1