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

[Bug]: 29.0.11 RC1 & 30.0.5 RC1: Security & setup warnings: Failed to write and read a value from distributed cache #50110

Closed
5 of 8 tasks
RainerEmrich opened this issue Jan 9, 2025 · 2 comments · Fixed by #50113

Comments

@RainerEmrich
Copy link

RainerEmrich commented Jan 9, 2025

⚠️ This issue respects the following points: ⚠️

Bug description

Got this message after upgrade from 29.0.10 to 29.0.11 RC1. Nothing else changed.
Distributed cache is Redis. I think that's a false positive, no entries in the logs.
Any comments?

Steps to reproduce

  1. Upgrade nextcloud which uses redis as ditributed cache from 29.0.10 to 29.0.11 RC1.

Expected behavior

There should be no error in the Security & setup warnings.

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "testcloud.emrich-ebersheim.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/testcloud.emrich-ebersheim.de\/",
        "htaccess.RewriteBase": "\/",
        "dbtype": "mysql",
        "version": "29.0.11.0",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "dbindex": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "filelocking.enabled": true,
        "appstore.experimental.enabled": "true",
        "updater.release.channel": "stable",
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "enable_previews": true,
        "preview_max_x": 1024,
        "preview_max_y": 1024,
        "preview_max_scale_factor": 8,
        "trashbin_retention_obligation": "auto",
        "maintenance": false,
        "default_language": "de",
        "default_phone_region": "DE",
        "theme": "",
        "loglevel": 2,
        "mysql.utf8mb4": true,
        "app_install_overwrite": [
            "files_readmemd",
            "co2clock",
            "data_request",
            "carnet",
            "breezedark"
        ],
        "has_rebuilt_cache": true,
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance_window_start": 2
    }
}

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

@RainerEmrich RainerEmrich added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jan 9, 2025
@RainerEmrich
Copy link
Author

For nextcloud 30.0.5 RC1 it's the same.

@RainerEmrich RainerEmrich changed the title [Bug]: Security & setup warnings: Failed to write and read a value from distributed cache [Bug]: 29.0.11 RC1 & 30.0.5 RC1: Security & setup warnings: Failed to write and read a value from distributed cache Jan 9, 2025
@joshtrichards
Copy link
Member

Confirmed.

It's an interaction between random_bytes() and this bit of code:

protected static function encodeValue(mixed $value): string {
return is_int($value) ? (string)$value : json_encode($value);
}
protected static function decodeValue(string $value): mixed {
return is_numeric($value) ? (int)$value : json_decode($value, true);
}

The easiest solution is to bin2hex() $random before we set it I think.

@joshtrichards joshtrichards added 3. to review Waiting for reviews feature: settings 30-feedback and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants