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

Clusters with slashes in name cannot be fetched by UI #9812

Closed
3 tasks done
erhudy opened this issue Jun 28, 2022 · 0 comments · Fixed by #9813
Closed
3 tasks done

Clusters with slashes in name cannot be fetched by UI #9812

erhudy opened this issue Jun 28, 2022 · 0 comments · Fixed by #9813
Labels
bug Something isn't working component:api API bugs and enhancements component:ui User interfaces bugs and enhancements

Comments

@erhudy
Copy link
Contributor

erhudy commented Jun 28, 2022

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

If a cluster name has a slash in it (and I would guess possibly other characters that need to be URL-encoded), the API will return a 403 instead of information on that cluster, presumably because it is interpreting the extra slashes as part of an API route and not the name of the cluster.

To Reproduce

  1. Make a cluster with a slash in the name.
  2. Deploy an app to it.
  3. Open that application's details view in the UI and observe that the cluster name on the Summary tab is in-cluster (undefined).
  4. Check the console and verify that you are getting a 403 from the Argo CD API.

Expected behavior

The cluster should be fetched as normal.

Screenshots

Version

argocd: v2.4.2+c6d0c8b
  BuildDate: 2022-06-21T21:03:41Z
  GitCommit: c6d0c8baaa291cd68465acd7ad6bef58b2b6f942
  GitTreeState: clean
  GoVersion: go1.18.3
  Compiler: gc
  Platform: linux/amd64

Logs

Paste any relevant application logs here.
@erhudy erhudy added the bug Something isn't working label Jun 28, 2022
@ishitasequeira ishitasequeira added the component:ui User interfaces bugs and enhancements label Jun 29, 2022
@saumeya saumeya added the component:api API bugs and enhancements label Jun 30, 2022
erhudy added a commit to erhudy/argo-cd that referenced this issue Nov 4, 2022
Fixes argoproj#9812

If a cluster name has a slash in it, the API would not be able
to fetch that cluster and would display "in-cluster (undefined)"
for that application. This fixes that issue by URI-encoding
the cluster name on the UI side and URI-decoding the cluster name
on the API side.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
erhudy added a commit to erhudy/argo-cd that referenced this issue Nov 7, 2022
Fixes argoproj#9812

If a cluster name has a slash in it, the API would not be able
to fetch that cluster and would display "in-cluster (undefined)"
for that application. This fixes that issue by URI-encoding
the cluster name on the UI side and URI-decoding the cluster name
on the API side.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
crenshaw-dev pushed a commit that referenced this issue Nov 17, 2022
* fix: #9812 UI can now get clusters with slashes in name

Fixes #9812

If a cluster name has a slash in it, the API would not be able
to fetch that cluster and would display "in-cluster (undefined)"
for that application. This fixes that issue by URI-encoding
the cluster name on the UI side and URI-decoding the cluster name
on the API side.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

* Retrigger CI pipeline

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
crenshaw-dev pushed a commit that referenced this issue Nov 17, 2022
* fix: #9812 UI can now get clusters with slashes in name

Fixes #9812

If a cluster name has a slash in it, the API would not be able
to fetch that cluster and would display "in-cluster (undefined)"
for that application. This fixes that issue by URI-encoding
the cluster name on the UI side and URI-decoding the cluster name
on the API side.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

* Retrigger CI pipeline

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
crenshaw-dev pushed a commit that referenced this issue Nov 17, 2022
* fix: #9812 UI can now get clusters with slashes in name

Fixes #9812

If a cluster name has a slash in it, the API would not be able
to fetch that cluster and would display "in-cluster (undefined)"
for that application. This fixes that issue by URI-encoding
the cluster name on the UI side and URI-decoding the cluster name
on the API side.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

* Retrigger CI pipeline

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
crenshaw-dev pushed a commit that referenced this issue Nov 17, 2022
* fix: #9812 UI can now get clusters with slashes in name

Fixes #9812

If a cluster name has a slash in it, the API would not be able
to fetch that cluster and would display "in-cluster (undefined)"
for that application. This fixes that issue by URI-encoding
the cluster name on the UI side and URI-decoding the cluster name
on the API side.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

* Retrigger CI pipeline

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
ashutosh16 pushed a commit to ashutosh16/argo-cd that referenced this issue Nov 23, 2022
…goproj#9813)

* fix: argoproj#9812 UI can now get clusters with slashes in name

Fixes argoproj#9812

If a cluster name has a slash in it, the API would not be able
to fetch that cluster and would display "in-cluster (undefined)"
for that application. This fixes that issue by URI-encoding
the cluster name on the UI side and URI-decoding the cluster name
on the API side.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

* Retrigger CI pipeline

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
emirot pushed a commit to emirot/argo-cd that referenced this issue Jan 27, 2023
…goproj#9813)

* fix: argoproj#9812 UI can now get clusters with slashes in name

Fixes argoproj#9812

If a cluster name has a slash in it, the API would not be able
to fetch that cluster and would display "in-cluster (undefined)"
for that application. This fixes that issue by URI-encoding
the cluster name on the UI side and URI-decoding the cluster name
on the API side.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

* Retrigger CI pipeline

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:api API bugs and enhancements component:ui User interfaces bugs and enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants