You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2021. It is now read-only.
I discovered this when attempting to export local dashboards to a Grafana instance using the username admin and a password containing a /, which for explanatory purposes let's pretend was pass/word. Setting the password to pass/word using wizzy set grafana and then trying to run wizzy export dashboards resulted in the following error:
# wizzy export dashboards
/app/node_modules/sync-request/index.js:37
throw new Error(response.error.message || response.error || response);
^
Error: getaddrinfo ENOTFOUND admin admin:443
at doRequest (/app/node_modules/sync-request/index.js:37:11)
at /app/src/remote/grafana/exportSrv.js:197:20
at arrayEach (/app/node_modules/lodash/lodash.js:537:11)
at Function.forEach (/app/node_modules/lodash/lodash.js:9359:14)
at Request.saveHandler [as _callback] (/app/src/remote/grafana/exportSrv.js:181:5)
at Request.self.callback (/app/node_modules/request/request.js:186:22)
at emitTwo (events.js:125:13)
at Request.emit (events.js:213:7)
at Request.<anonymous> (/app/node_modules/request/request.js:1163:10)
at emitOne (events.js:115:13)
I suspected that this might be because the password is being used to construct a URL of the form https://user:password@hostname, and the password wasn't being URL-encoded. So I changed the password in Wizzy's config (but making no change in Grafana) from pass/word to pass%2Fword. This fixed the problem... for wizzy export dashboards. But it broke other commands, such as wizzy list dashboards, which worked before but now result in a 401 error:
# wizzy list dashboards
Grafana API response status code = 401
No error body from Grafana API.
I think this bug would be fixed by URL-encoding the password when constructing a URL that gets used in an API call somewhere beneath wizzy export dashboards. The desired behavior of course is for pass/word to work correctly for all commands, without the user having to think about percent-encoding weird characters.
Let me know if you need further details to reproduce this. And thanks for maintaining Wizzy! It's a really useful tool.
The text was updated successfully, but these errors were encountered:
Wizzy version: 0.5.9
I discovered this when attempting to export local dashboards to a Grafana instance using the username
admin
and a password containing a/
, which for explanatory purposes let's pretend waspass/word
. Setting the password topass/word
usingwizzy set grafana
and then trying to runwizzy export dashboards
resulted in the following error:I suspected that this might be because the password is being used to construct a URL of the form
https://user:password@hostname
, and the password wasn't being URL-encoded. So I changed the password in Wizzy's config (but making no change in Grafana) frompass/word
topass%2Fword
. This fixed the problem... forwizzy export dashboards
. But it broke other commands, such aswizzy list dashboards
, which worked before but now result in a 401 error:I think this bug would be fixed by URL-encoding the password when constructing a URL that gets used in an API call somewhere beneath
wizzy export dashboards
. The desired behavior of course is forpass/word
to work correctly for all commands, without the user having to think about percent-encoding weird characters.Let me know if you need further details to reproduce this. And thanks for maintaining Wizzy! It's a really useful tool.
The text was updated successfully, but these errors were encountered: