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

GroupId Link 404 Fix #643

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aakashthakare
Copy link

@aakashthakare aakashthakare commented May 22, 2024

  • Introduce base64 groupId.
  • Use encoded groupId in link.
  • Fix 404 error incase groupd id contains HTML tags.

Relates to #641

@Bert-R
Copy link
Collaborator

Bert-R commented Jun 8, 2024

@davideicardi You are familiar with the issue (#641). Can you review this PR?

Copy link
Collaborator

@davideicardi davideicardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about base64 encoding. See comment.

@@ -156,7 +156,7 @@
<tbody>
<#list consumers![] as c>
<tr>
<td><a href="<@spring.url '/consumer/${c.groupId}'/>">${c.groupId}</a></td>
<td><a href="<@spring.url '/consumer/${c.groupIdBase64}'/>">${c.groupId}</a></td>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using a base64 encoding, why not just url encode it? In this way it should be handled automatically by spring I suppose. Probably you can use UriComponentsBuilder. In this way you don't need to change src/main/java/kafdrop/controller/ConsumerController.java.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that way as well, however spring.url was again converting it to decoded value, which was ending up with error when you click on consumer group link.

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