Skip to content

fix: correctly decode and validate basic auth for metrics (#151) - #153

Merged
1Lucas1apk merged 5 commits into
PerformanC:devfrom
SinghAman21:woc-iss-151
Jan 18, 2026
Merged

fix: correctly decode and validate basic auth for metrics (#151)#153
1Lucas1apk merged 5 commits into
PerformanC:devfrom
SinghAman21:woc-iss-151

Conversation

@SinghAman21

Copy link
Copy Markdown
Contributor

Changes

Write here about the changes you've made

Why

Write here why you think this should be merged

Critical auth bug, read issue #151

Checkmarks

  • The modified endpoints have been tested.
  • Used the same indentation as the rest of the project.
  • Still compatible with LavaLink clients.

Additional information

If you have any additional information, write it here

Basic YWRtaW46eW91c2hhbGxub3RwYXNz" === "Basic admin:youshallnotpass -> FALSE || 401
new code does is decoding the base64 and breaks after : and checks the password

UnschooledGamer and others added 4 commits January 18, 2026 10:45
Added a new issue report template for Winter of Code participants, including fields for version, description, client, steps to reproduce, example code, and confirmations.

Signed-off-by: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com>
Signed-off-by: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com>
Added a feature request template for Winter of Code to streamline suggestions for improvements or new features.

Signed-off-by: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com>
@1Lucas1apk

Copy link
Copy Markdown
Member

It was tested, and from what I've tested it's fixed, but wouldn't it be interesting to add the option to enter a username for authentication with BASIC?

@SinghAman21

Copy link
Copy Markdown
Contributor Author

oh got it, it will be a simple one. just have to handle new parameter username.
will first check with config.ts then make changes in the default.config.ts

@SinghAman21

Copy link
Copy Markdown
Contributor Author

It was tested, and from what I've tested it's fixed, but wouldn't it be interesting to add the option to enter a username for authentication with BASIC?

oh got it, it will be a simple one. just have to handle new parameter username. will first check with config.ts then make changes in the default.config.ts

echo -n "admin:youshallnotpass" | base64  -> YWRtaW46eW91c2hhbGxub3RwYXNz

curl -v -H "Authorization: Bearer YWRtaW46eW91c2hhbGxub3RwYXNz" http://localhost:3000/v4/metrics
image image

@1Lucas1apk

Copy link
Copy Markdown
Member

It was tested and confirmed, thank you very much for reporting the bug and fixing it.

@1Lucas1apk
1Lucas1apk merged commit 0b3d5d2 into PerformanC:dev Jan 18, 2026
@SinghAman21

Copy link
Copy Markdown
Contributor Author

btw @1Lucas1apk wanted to know your expectations from the Winter of code proposal, if you may.

@1Lucas1apk

Copy link
Copy Markdown
Member

As a mentor, I hope Winter of Code, together with LeetCode, becomes a shared learning experience. Sometimes we overlook very small details, and other people can spot them more easily, or have more experience in certain areas, which helps keep the project consistent and well maintained, just like what you have been doing.

I also hope contributors who are being mentored through the projects can learn even more by contributing for real, getting feedback in code reviews, improving step by step, and building the confidence to keep contributing after the event. Overall, that is my view: collaboration, continuous improvement, and real open source learning :)

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

Successfully merging this pull request may close these issues.

3 participants