DietPi-Software | Grafana: Passwords with special chars are added wrong

Created on 20 Nov 2018  ·  7Comments  ·  Source: MichaIng/DietPi

Ref: https://dietpi.com/phpbb/viewtopic.php?f=15&t=5248&p=15446#p15446

; and # have to be escaped via tripple "double quotes" around the whole string. This seems to be the case for all setting values, containing these characters, so we should apply it by default: http://docs.grafana.org/installation/configuration/#password

Bug Solution available Via Forum

All 7 comments

Solved via: https://github.com/Fourdee/DietPi/commit/1fb6414aa26e3ac3f2017e72b942bc6b753181b6

  • Whoopsie, actually wanted to add this via PR. However fix is very straight forward according to docs, works with simple PWs as well.

Further testing:
🈯️ Reinstall preserving existing database/plugin dir
🈯️ Uninstall
🈯️ Fresh install
🈯️ WebUI, login
🈯️ Update via APT. In case we update repo/method, leave repo install in place, even on reinstall.


Fresh install comes with commented admin_password. Thus if it's not commented, it was manually set by user. Thus preserve this on reinstall: https://github.com/Fourdee/DietPi/commit/822406a7048c09765d70672b3b05a73e257f45f2
🈯️ Password preserved on reinstall


Changelog entry: https://github.com/Fourdee/DietPi/commit/3a607eb07bb25b9f8ae098775d81c4733597c6c6

Install + use test

  • ARMv8 | pw=dietpi
[  OK  ] DietPi-Software | Comment in /etc/grafana/grafana.ini converted to setting: admin_password = """dietpi"""

-- GUI login 🈯️

Install + use test:

  • ARMv8 | pw =$&\"moocow
    -- 🈯️ GUI login
[  OK  ] DietPi-Software | Comment in /etc/grafana/grafana.ini converted to setting: admin_password = """$&\"moocow"""

@MichaIng

Testing passed, great work 👍 🥇

Reinstall patch?
~Or probably best to manually uninstall + install for affected users?~

Looks safe + testing passed

            # - Move DB/plugins to userdata location, if not already existent
            if [[ -d $G_FP_DIETPI_USERDATA/grafana ]]; then

                G_DIETPI-NOTIFY 2 "Existing database/plugin directory $G_FP_DIETPI_USERDATA/grafana found. Will not overwrite..."
                [[ -e /var/lib/grafana ]] && rm -R /var/lib/grafana

@Fourdee
Patch not required from my point of view.

Users who have this installed are either not affected or fixed it manually, obviously :wink:.

So this is only important for fresh installs when global password is applied.

@MichaIng

Great work, local testing passed, will mark as completed 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fourdee picture Fourdee  ·  3Comments

Fourdee picture Fourdee  ·  3Comments

Kapot picture Kapot  ·  3Comments

pfeerick picture pfeerick  ·  3Comments

Fourdee picture Fourdee  ·  3Comments