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

Many Errors Created when admin impersonates Regular user #411

Closed
wriver4 opened this issue Feb 9, 2025 · 6 comments
Closed

Many Errors Created when admin impersonates Regular user #411

wriver4 opened this issue Feb 9, 2025 · 6 comments

Comments

@wriver4
Copy link

wriver4 commented Feb 9, 2025

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Impersonate user

Expected behaviour

No Errors Logged

Actual behaviour

{
  "reqId": "Z6jZ_koG-im3oEZxdsxadgAAAA8",
  "level": 2,
  "time": "2025-02-09T16:38:22+00:00",
  "remoteAddr": "73.216.73.197",
  "user": "markweisser",
  "app": "impersonate",
  "method": "POST",
  "url": "/index.php/apps/impersonate/user",
  "message": "User markweisser trying to impersonate user waveCLOUD",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
  "version": "30.0.5.1",
  "data": {
    "app": "impersonate"
  },
  "id": "67a8e5c631400"
}
{
  "reqId": "Z6jZ_koG-im3oEZxdsxadgAAAA8",
  "level": 2,
  "time": "2025-02-09T16:38:22+00:00",
  "remoteAddr": "73.216.73.197",
  "user": "markweisser",
  "app": "impersonate",
  "method": "POST",
  "url": "/index.php/apps/impersonate/user",
  "message": "Changing to user waveCLOUD",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
  "version": "30.0.5.1",
  "data": {
    "app": "impersonate"
  },
  "id": "67a8e5c6313f6"
}

During
count 26
Raw log entry
{
  "reqId": "Z6jaQ8Pkt2wfahLOyOWIxQAAAAY",
  "level": 3,
  "time": "2025-02-09T16:39:31+00:00",
  "remoteAddr": "73.216.73.197",
  "user": "waveCLOUD",
  "app": "no app in context",
  "method": "GET",
  "url": "/ocs/v2.php/teams/resources/account/6f86fc72-898e-4c0d-ac21-0a142e8edfbd",
  "message": "No provider found for id account",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
  "version": "30.0.5.1",
  "exception": {
    "Exception": "RuntimeException",
    "Message": "No provider found for id account",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/cloud.waveguardco.net/public_html/lib/private/Teams/TeamManager.php",
        "line": 91,
        "function": "getProvider",
        "class": "OC\\Teams\\TeamManager",
        "type": "->"
      },
      {
        "file": "/var/www/cloud.waveguardco.net/public_html/core/Controller/TeamsApiController.php",
        "line": 68,
        "function": "getTeamsForResource",
        "class": "OC\\Teams\\TeamManager",
        "type": "->"
      },
      {
        "file": "/var/www/cloud.waveguardco.net/public_html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 208,
        "function": "listTeams",
        "class": "OC\\Core\\Controller\\TeamsApiController",
        "type": "->"
      },
      {
        "file": "/var/www/cloud.waveguardco.net/public_html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/cloud.waveguardco.net/public_html/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/cloud.waveguardco.net/public_html/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/cloud.waveguardco.net/public_html/ocs/v1.php",
        "line": 43,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/cloud.waveguardco.net/public_html/ocs/v2.php",
        "line": 7,
        "args": [
          "/var/www/cloud.waveguardco.net/public_html/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/cloud.waveguardco.net/public_html/lib/private/Teams/TeamManager.php",
    "Line": 65,
    "message": "No provider found for id account",
    "exception": [],
    "CustomMessage": "No provider found for id account"
  },
  "id": "67a8e5c6311f4"
  
  After
  [PHP] Error: TypeError: OCA\UserStatus\Controller\UserStatusController::__construct(): Argument #3 ($userId) must be of type string, null given at /var/www/cloud.waveguardco.net/public_html/apps/user_status/lib/Controller/UserStatusController.php#36
	GET /ocs/v2.php/apps/user_status/api/v1/user_status
	from 98.53.212.142 by -- at Feb 9, 2025, 5:26:27 PM ```

### Server configuration

**Web server:** Apache 2.4.6

**Database:** MySQL 8.0.41

**PHP version:** 8.3.16

**Nextcloud version:** 30.0.5

**Operating system:** Ubuntu 22.04.5 LTS
@blizzz
Copy link
Member

blizzz commented Feb 10, 2025

Hi @wriver4, thanks for your report.

The first two messages are not errors, but awareness ones.

The third might or might not be related to impersonation. Does it also appear when this user is logged in properly?

The last one is unrelated.

@wriver4
Copy link
Author

wriver4 commented Feb 11, 2025

The above log entries are the before, during and after as noted. I reformatted the message to reflect this. I am the admin, the only one with the impersonate permissions and the only one on the server at the time. I felt showing the process logged might be helpful especially when they were consecutive in the log. I skipped the 26 identical one labeled during for brevity.
Cheers!

@blizzz
Copy link
Member

blizzz commented Feb 12, 2025

Okay, understood, but that does not really answer the question?

The fourth one should be unrelated as the request stems from a different IP address.

@wriver4
Copy link
Author

wriver4 commented Feb 14, 2025

Then ignore it for me.

@blizzz
Copy link
Member

blizzz commented Feb 20, 2025

I cannot reproduce anything but the intentional messages.

The "No provider found for id account" stems from server and I would assume you can provoke it with other actions as well, not just impersonating. Did you check for this?

@wriver4
Copy link
Author

wriver4 commented Feb 26, 2025

Upgraded to 30.0.6 problem solved for impersonation issue.

@wriver4 wriver4 closed this as completed Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants