Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enviroment Provider Fails on Special Characters #87858

Open
iveelsm opened this issue May 14, 2024 · 0 comments
Open

Enviroment Provider Fails on Special Characters #87858

iveelsm opened this issue May 14, 2024 · 0 comments

Comments

@iveelsm
Copy link

iveelsm commented May 14, 2024

What happened?

When using the env provider ($__env{EXAMPLE}) the resulting value is incorrectly parsed when some special characters are in use, namely: # and ;. This is highlighted in the database configuration as causing potential problems here:

# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""

I attempted with both:

password: $__env{ENV_PASSWORD}

and a triple quote:

password: """$__env{ENV_PASSWORD}"""

The triple quote seems to cause more issues as it won't actually recognize the value in that case it seems like. This is remedied by changing the value to something that does not contain those special characters.

What did you expect to happen?

I expected that I would either be able to use the env provider with the special characters, or work around it using the documented workaround. However, it seems that neither are the case.

Did this work before?

No.

How do we reproduce it?

  1. Set up a database user that has a password with special characters like # or ;
  2. Attempt to connect grafana to that database instance using the env provider for the password

Is the bug inside a dashboard panel?

No response

Environment (with versions)?

Grafana: 7.3.9
OS: N/A
Browser: N/A

Grafana platform?

Kubernetes

Datasource(s)?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant