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

[Bug] Question mark in user_secret gets encoded wrong #1009

Open
ljvdhooft opened this issue Oct 3, 2024 · 1 comment
Open

[Bug] Question mark in user_secret gets encoded wrong #1009

ljvdhooft opened this issue Oct 3, 2024 · 1 comment

Comments

@ljvdhooft
Copy link

ljvdhooft commented Oct 3, 2024

Describe the bug

When you use a question mark in the client_secret with OAuth2, the question mark doesn't get encoded properly.

Steps to reproduce

  • Add Infinity as data source
  • Configure Authentication to OAuth2, Auth style "In Header"
  • Add a question mark client_id and client_secret
  • Perform the test request to a mock server
  • Read out the request headers and compare them to another base64 encoder.

Sample Data

  % echo -n '?:?' | base64                                                                                                                                                                                                             
Pzo/

When retrieving the base64 encoded string from Infinity:
authorization: "Basic JTNGOiUzRg=="

Decoding this string results in:

  % echo -n 'JTNGOiUzRg==' | base64 --decode                                                                                                                                                                                          
%3F:%3F%

Version Details:

  • Grafana version : v11.1.4
  • Plugin version : 2.10.0
@ljvdhooft
Copy link
Author

After some more testing it seems to happen with other special characters as well, exclamation mark (!) doesn't work either

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