Skip to content

Conversation

@kesselb
Copy link
Contributor

@kesselb kesselb commented Jul 19, 2021

If redis is password protected and the password is incorrect something like below will end up in the logs. The same error is thrown if the connection is interrupted. This patch will replace the actual password with *** sensitive parameters replaced ***.

{
  "reqId": "rIZRf0kETxwygW3M0rfc",
  "level": 3,
  "time": "2021-07-19T17:47:37+00:00",
  "remoteAddr": "192.168.208.1",
  "user": "--",
  "app": "core",
  "method": "GET",
  "url": "/favicon.ico",
  "message": "WRONGPASS invalid username-password pair or user is disabled.",
  "userAgent": "super client",
  "version": "23.0.0.0",
  "exception": {
    "Exception": "RedisException",
    "Message": "WRONGPASS invalid username-password pair or user is disabled.",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/RedisFactory.php",
        "line": 93,
        "function": "auth",
        "class": "Redis",
        "type": "->",
        "args": [
          "blubblub"
        ]
      },
      {
        "file": "/var/www/html/lib/private/RedisFactory.php",
        "line": 107,
        "function": "create",
        "class": "OC\\RedisFactory",
        "type": "->",
        "args": []
      },
      ........
    ],
    "File": "/var/www/html/lib/private/RedisFactory.php",
    "Line": 93,
    "CustomMessage": "--"
  }
}

@kesselb kesselb added bug 3. to review Waiting for reviews labels Jul 19, 2021
@kesselb kesselb added this to the Nextcloud 23 milestone Jul 19, 2021
Copy link
Member

@CarlSchwan CarlSchwan left a comment

Choose a reason for hiding this comment

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

Makes sense :)

@skjnldsv skjnldsv merged commit 5579aaa into master Jul 19, 2021
@skjnldsv skjnldsv deleted the bug/noid/dont-log-redis-password branch July 19, 2021 20:34
@kesselb
Copy link
Contributor Author

kesselb commented Jul 19, 2021

/backport to stable22
/backport to stable21
/backport to stable20

@Pytal
Copy link
Member

Pytal commented Jul 19, 2021

/backport to stable21

@Pytal
Copy link
Member

Pytal commented Jul 19, 2021

/backport to stable20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants