Skip to content
New issue

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

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

Already on GitHub? # to your account

cannot redirect to other site with OIDC login and empty redirect_url parameter #20226

Closed
pborn-ionos opened this issue Apr 4, 2024 · 3 comments · Fixed by #20238
Closed

cannot redirect to other site with OIDC login and empty redirect_url parameter #20226

pborn-ionos opened this issue Apr 4, 2024 · 3 comments · Fixed by #20238
Assignees
Labels

Comments

@pborn-ionos
Copy link

PR #20025 broke Harbor for us.

We have OIDC enabled and the user is on /account/sign-in, the login button for OIDC points to /c/oidc/#?redirect_url= and an empty redirect_url errors out with

{
  "errors": [
    {
      "code": "BAD_REQUEST",
      "message": "cannot redirect to other site"
    }
  ]
}
@Vad1mo
Copy link
Member

Vad1mo commented Apr 5, 2024

Ok, do I understand you correctly that you want that redirect_url="" is supported?

@Vad1mo Vad1mo added the kind/bug label Apr 5, 2024
stonezdj pushed a commit to stonezdj/harbor that referenced this issue Apr 8, 2024
  fixes goharbor#20226

Signed-off-by: stonezdj <daojunz@vmware.com>
stonezdj pushed a commit to stonezdj/harbor that referenced this issue Apr 8, 2024
  fixes goharbor#20226

Signed-off-by: stonezdj <daojunz@vmware.com>
stonezdj pushed a commit to stonezdj/harbor that referenced this issue Apr 8, 2024
  fixes goharbor#20226

Signed-off-by: stonezdj <daojunz@vmware.com>
stonezdj pushed a commit to stonezdj/harbor that referenced this issue Apr 8, 2024
  fixes goharbor#20226

Signed-off-by: stonezdj <daojunz@vmware.com>
@stonezdj stonezdj self-assigned this Apr 8, 2024
@stonezdj
Copy link
Contributor

stonezdj commented Apr 8, 2024

Because the default value for redirect_url is /harbor/projects/when click the OIDC login button, How did you set the redirect_url to an empty string?
Screenshot 2024-04-08 at 12 35 14

stonezdj added a commit that referenced this issue Apr 8, 2024
Allow empty path in redirect_url

  fixes #20226

Signed-off-by: stonezdj <daojunz@vmware.com>
Co-authored-by: stonezdj <daojunz@vmware.com>
stonezdj added a commit that referenced this issue Apr 8, 2024
Allow empty path in redirect_url

  fixes #20226

Signed-off-by: stonezdj <daojunz@vmware.com>
Co-authored-by: stonezdj <daojunz@vmware.com>
stonezdj added a commit that referenced this issue Apr 8, 2024
Allow empty path in redirect_url

  fixes #20226

Signed-off-by: stonezdj <daojunz@vmware.com>
Co-authored-by: stonezdj <daojunz@vmware.com>
stonezdj pushed a commit to stonezdj/harbor that referenced this issue Apr 8, 2024
  fixes goharbor#20226

Signed-off-by: stonezdj <daojunz@vmware.com>
@pborn-ionos
Copy link
Author

We did not explicitly set it like that. It just happened and caused user complaints, requiring us to downgrade.

stonezdj pushed a commit to stonezdj/harbor that referenced this issue Apr 9, 2024
  fixes goharbor#20226

Signed-off-by: stonezdj <daojunz@vmware.com>
wy65701436 pushed a commit to wy65701436/harbor that referenced this issue Apr 9, 2024
fixes goharbor#20226

Signed-off-by: stonezdj <daojunz@vmware.com>
Co-authored-by: stonezdj <daojunz@vmware.com>
wy65701436 pushed a commit to wy65701436/harbor that referenced this issue Apr 9, 2024
fixes goharbor#20226

Signed-off-by: stonezdj <daojunz@vmware.com>
Co-authored-by: stonezdj <daojunz@vmware.com>
Signed-off-by: wang yan <wangyan@vmware.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants