nextcloud / nextcloud/server

`OC\Authentication\Exceptions\TokenPasswordExpiredException` spammed in log as "error"

Open
#41,408 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop 28-feedback bug feature: authentication regression
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

We have this log ~320 times already since 2 days.

{
  "reqId": "09mHVnNYnMs0lEpOn2sY",
  "level": 3,
  "time": "2023-11-13T08:19:45+00:00",
  "remoteAddr": "*** sensitive parameters replaced ***",
  "user": "*** sensitive parameters replaced ***",
  "app": "no app in context",
  "method": "POST",
  "url": "/ocs/v2.php/apps/spreed/api/v4/room/*** sensitive parameters replaced ***/participants/active",
  "message": "",
  "userAgent": "Mozilla/5.0 (iOS) Nextcloud-Talk v17.1.1",
  "version": "28.0.0.4",
  "exception": {
    "Exception": "OC\\Authentication\\Exceptions\\TokenPasswordExpiredException",
    "Message": "",
    "Code": 0,
    "Trace": [
      {
        "file": "…/lib/private/Authentication/Token/Manager.php",
        "line": 133,
        "function": "getToken",
        "class": "OC\\Authentication\\Token\\PublicKeyTokenProvider",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "…/lib/private/User/Session.php",
        "line": 784,
        "function": "getToken",
        "class": "OC\\Authentication\\Token\\Manager",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "…/lib/private/User/Session.php",
        "line": 258,
        "function": "validateToken",
        "class": "OC\\User\\Session",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "…/lib/private/User/Session.php",
        "line": 233,
        "function": "validateSession",
        "class": "OC\\User\\Session",
        "type": "->",
        "args": []
      },
      {
        "file": "…/lib/private/legacy/OC_App.php",
        "line": 227,
        "function": "getUser",
        "class": "OC\\User\\Session",
        "type": "->",
        "args": []
      },
      {
        "file": "…/lib/private/App/AppManager.php",
        "line": 195,
        "function": "getEnabledApps",
        "class": "OC_App",
        "type": "::",
        "args": []
      },
      {
        "file": "…/lib/private/legacy/OC_App.php",
        "line": 125,
        "function": "loadApps",
        "class": "OC\\App\\AppManager",
        "type": "->",
        "args": [
          [
            "extended_authentication"
          ]
        ]
      },
      {
        "file": "…/ocs/v1.php",
        "line": 53,
        "function": "loadApps",
        "class": "OC_App",
        "type": "::",
        "args": [
          [
            "extended_authentication"
          ]
        ]
      },
      {
        "file": "…/ocs/v2.php",
        "line": 23,
        "args": [
          "…/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "…/lib/private/Authentication/Token/PublicKeyTokenProvider.php",
    "Line": 192,
    "CustomMessage": "--"
  }
}

Not sure what the problem actually is. Is this one of the added debugging steps for the session loss @ChristophWurst ? Or something else is wrong now?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/private/Authentication/Token/PublicKeyTokenProvider.php around line 192 and follow the calls through Authentication/Token/Manager.php line 133 and User/Session.php. Reproduce the OCS request if possible and determine why TokenPasswordExpiredException is logged repeatedly as an error; completion should explain the cause and define the appropriate handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.