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

fix impersonated request user mismatch #10550

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Conversation

2403905
Copy link
Contributor

@2403905 2403905 commented Nov 12, 2024

Description

We fixed a user id and name mismatch in the impersonated auth-app API request

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Copy link
Collaborator

@kobergj kobergj left a comment

Choose a reason for hiding this comment

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

usual nitpicking...

@@ -0,0 +1,6 @@
Bugfix: Fix impersonated request user mismatch

We fixed a user id and mane mismatch in the impersonated auth-app API request
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
We fixed a user id and mane mismatch in the impersonated auth-app API request
We fixed a user id and name mismatch in the impersonated auth-app API request

if err != nil {
sublog.Error().Err(err).Msg("error authenticating user")
if strings.Contains(err.Error(), "requested user does not match") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

use a dedicated error type if you want to react on it. String matching will always end up in bugs :)

@2403905 2403905 enabled auto-merge November 12, 2024 16:00
@2403905 2403905 merged commit 5502cc2 into owncloud:master Nov 13, 2024
4 checks passed
ownclouders pushed a commit that referenced this pull request Nov 13, 2024
fix impersonated request user mismatch
@ScharfViktor ScharfViktor mentioned this pull request Nov 21, 2024
85 tasks
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.

Productize app tokens for service integration
3 participants