marius-wieschollek / passwords

A simple, yet feature rich password manager for Nextcloud
GNU Affero General Public License v3.0
215 stars 46 forks source link

[BUG]: /app/passwords mentioned in an exception trace #651

Open GogoFC opened 7 months ago

GogoFC commented 7 months ago

⚠️ This issue respects the following points: ⚠️

Server Information

Bug description

I ran into an exeption by 'index' app, then the trace mentioned 'passwords' app saying 'unable to verify user'. Should 'passwords' app be doing such thing or did I misread the logs? So the question is does this error have anything to do with the 'passwords' app since it is mentioned in the trace. Part of trace pasted below:

## Server configuration detail

**Operating system:** Linux 5.15.0-97-generic #107-Ubuntu SMP Wed Feb 7 13:26:48 UTC 2024 x86_64

**Webserver:** Unknown (cli)

**Database:** mysql 10.6.16

**PHP version:** 8.1.2-1ubuntu2.14

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache

**Nextcloud version:** 28.0.2 - 28.0.2.5

**Updated from an older Nextcloud/ownCloud or fresh install:** 

**Where did you install Nextcloud from:** unknown

<details><summary>Signing status</summary>

[]
</details>

<details><summary>List of activated apps</summary>

Enabled:
 - activity: 2.20.0
 - bruteforcesettings: 2.8.0
 - cadviewer: 9.44.2
 - calendar: 4.6.4
 - circles: 28.0.0-dev
 - cloud_federation_api: 1.11.0
 - comments: 1.18.0
 - contacts: 5.5.1
 - contactsinteraction: 1.9.0
 - dashboard: 7.8.0
 - dav: 1.29.1
 - federatedfilesharing: 1.18.0
 - federation: 1.18.0
 - files: 2.0.0
 - files_pdfviewer: 2.9.0
 - files_reminders: 1.1.0
 - files_sharing: 1.20.0
 - files_trashbin: 1.18.0
 - files_versions: 1.21.0
 - firstrunwizard: 2.17.0
 - groupfolders: 16.0.3
 - integration_google: 2.1.0
 - integration_openproject: 2.6.0
 - logreader: 2.13.0
 - lookup_server_connector: 1.16.0
 - mail: 3.5.5
 - nextcloud_announcements: 1.17.0
 - notes: 4.9.2
 - notifications: 2.16.0
 - oauth2: 1.16.3
 - password_policy: 1.18.0
 - photos: 2.4.0
 - privacy: 1.12.0
 - provisioning_api: 1.18.0
 - recommendations: 2.0.0
 - related_resources: 1.3.0
 - richdocuments: 8.3.1
 - richdocumentscode: 23.5.705
 - serverinfo: 1.18.0
 - settings: 1.10.1
 - sharebymail: 1.18.0
 - spreed: 18.0.3
 - support: 1.11.0
 - survey_client: 1.16.0
 - systemtags: 1.18.0
 - text: 3.9.1
 - theming: 2.3.0
 - twofactor_backupcodes: 1.17.0
 - updatenotification: 1.18.0
 - user_status: 1.8.1
 - viewer: 2.2.0
 - weather_status: 1.8.0
 - workflowengine: 2.10.0
Disabled:
 - admin_audit
 - encryption
 - files_external
 - integration_dropbox: 2.1.0
 - officeonline: 2.0.3
 - suspicious_login
 - twofactor_totp
 - user_ldap

Configuration (config/config.php) ``` { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "psg.tools" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "28.0.2.5", "overwrite.cli.url": "https:\/\/domain.com", "htaccess.RewriteBase": "\/", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "mail_smtpmode": "smtp", "mail_smtpsecure": "ssl", "mail_sendmailmode": "smtp", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "default_phone_region": "US", "memcache.local": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0 }, "enabledPreviewProviders": { "1": "OC\\Preview\\Movie", "0": "OC\\Preview\\Image", "2": "OC\\Preview\\HEIC" }, "maintenance": false, "theme": "", "loglevel": 2, "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "maintenance_window_start": 1 } ```

Cron Configuration: Array ( [backgroundjobs_mode] => cron [lastcron] => 1712189702 )

External storages: files_external is disabled

Encryption: no

User-backends:

Talk configuration:

STUN servers

TURN servers

Signaling servers (mode: default):

Recording servers:

Browser: unknown


### Client Information

There's 50 users.

### Bug description

I ran into an exeption by 'index' app, then the trace mentioned 'passwords' app saying 'unable to verify user'.
Should 'passwords' app be doing such thing or did I misread the logs? 
So the question is does this error have anything to do with the 'passwords' app since it is mentioned in the trace.
Part of trace pasted below:

### Steps to reproduce

No steps, it's more random. But the URI /dashboard isn't available when this happens.

### Expected behavior

.

### Nextcloud Logs

```shell
[index] Error: Unable to verify user user@aol.com
    GET /apps/dashboard/
    from 192.168.1.1 by user@aol.com at Apr 3, 2024, 6: 51: 06 PM

{
    "reqId": "oeNJj1hjB3DMmtJXbaYD",
    "level": 3,
    "time": "2024-04-03T16:51:06+00:00",
    "remoteAddr": "192.168.1.1",
    "user": "user@aol.com",
    "app": "index",
    "method": "GET",
    "url": "/apps/dashboard/",
    "message": "Unable to verify user user@aol.com",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
    "version": "28.0.2.5",
    "exception": {
        "Exception": "Exception",
        "Message": "Unable to verify user user@aol.com",
        "Code": 0,
        "Trace": [
            {
                "file": "/var/www/nextcloud/apps/passwords/lib/Services/EnvironmentService.php",
                "line": 359,
                "function": "loadUserInformation",
                "class": "OCA\\Passwords\\Services\\EnvironmentService",
                "type": "->"
            },
            {
                "file": "/var/www/nextcloud/apps/passwords/lib/Services/EnvironmentService.php",
                "line": 183,
                "function": "determineAppMode",
                "class": "OCA\\Passwords\\Services\\EnvironmentService",
                "type": "->"
            },
            {
                "function": "__construct",
                "class": "OCA\\Passwords\\Services\\EnvironmentService",
                "type": "->"
            },
            {
                "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
                "line": 120,
                "function": "newInstanceArgs",
                "class": "ReflectionClass",
                "type": "->"
            }

Browser Logs

.
TtuxX commented 4 months ago

Hello @marius-wieschollek ! Migrating from Nextcloud 28 to Nextcloud 29 triggered what appears to be kind of the same issue. Now, I cannot access the https://server/settings/admin/overview page anymore as it throws an error with the following log:

{"reqId":"XXXX","level":3,"time":"2024-07-01T15:21:28+00:00","remoteAddr":"XXXX","user":"XXXX","app":"index","method":"GET","url":"/settings/admin/logging","message":"Unable to verify user XXXX","userAgent":"XXXX","version":"29.0.3.4","exception":{"Exception":"Exception","Message":"Unable to verify user XXXX","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/passwords/lib/Services/EnvironmentService.php","line":361,"function":"loadUserInformation","class":"OCA\\Passwords\\Services\\EnvironmentService","type":"->","args":["XXXX",["OC\\AppFramework\\Http\\Request"]]},{"file":"/usr/local/www/nextcloud/apps/passwords/lib/Services/EnvironmentService.php","line":185,"function":"determineAppMode","class":"OCA\\Passwords\\Services\\EnvironmentService","type":"->","args":["XXXX",["OC\\AppFramework\\Http\\Request"]]},{"function":"__construct","class":"OCA\\Passwords\\Services\\EnvironmentService","type":"->","args":["XXXX",["OC\\AllConfig"],["OC\\AppFramework\\Http\\Request"],["OC\\Session\\CryptoSessionData"],["OCA\\Passwords\\Services\\LoggingService"],["OC\\Authentication\\Token\\Manager"],["OC\\User\\Session"],["OC\\User\\Manager"]]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":83,"function":"newInstanceArgs","class":"ReflectionClass","type":"->","args":[["XXXX",["OC\\AllConfig"],["OC\\AppFramework\\Http\\Request"],["OC\\Session\\CryptoSessionData"],["OCA\\Passwords\\Services\\LoggingService"],"And 3 more entries, set log level to debug to see all entries"]]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":128,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[["ReflectionClass","OCA\\Passwords\\Services\\EnvironmentService"]]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Passwords\\Services\\EnvironmentService"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":471,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Passwords\\Services\\EnvironmentService"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":443,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Passwords\\Services\\EnvironmentService"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":96,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Passwords\\Services\\EnvironmentService",true]},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":83,"function":"array_map","args":[["Closure"],["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":128,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[["ReflectionClass","OCA\\Passwords\\Services\\ConfigurationService"]]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Passwords\\Services\\ConfigurationService"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":471,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Passwords\\Services\\ConfigurationService"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":443,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Passwords\\Services\\ConfigurationService"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":96,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Passwords\\Services\\ConfigurationService",true]},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":83,"function":"array_map","args":[["Closure"],[["ReflectionParameter","request"],["ReflectionParameter","urlGenerator"],"*** sensitive parameters replaced ***",["ReflectionParameter","helperService"],["ReflectionParameter","fileCacheService"]]]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":128,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[["ReflectionClass","OCA\\Passwords\\Settings\\AdminSettings"]]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Passwords\\Settings\\AdminSettings"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":471,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Passwords\\Settings\\AdminSettings"]},{"file":"/usr/local/www/nextcloud/lib/private/ServerContainer.php","line":155,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Passwords\\Settings\\AdminSettings"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":64,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCA\\Passwords\\Settings\\AdminSettings"]},{"file":"/usr/local/www/nextcloud/lib/private/Settings/Manager.php","line":202,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Passwords\\Settings\\AdminSettings"]},{"file":"/usr/local/www/nextcloud/lib/private/Settings/Manager.php","line":350,"function":"getSettings","class":"OC\\Settings\\Manager","type":"->","args":["admin","overview"]},{"file":"/usr/local/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":93,"function":"getAllowedAdminSettings","class":"OC\\Settings\\Manager","type":"->","args":["overview",["OC\\User\\User"]]},{"file":"/usr/local/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":128,"function":"formatSections","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":[[[["OCA\\Settings\\Sections\\Admin\\Overview"]],[["OCA\\Settings\\Sections\\Admin\\Server"]],[["OCA\\Settings\\Sections\\Admin\\Sharing"]],[["OCA\\Settings\\Sections\\Admin\\Security"]],[["OCA\\Theming\\Settings\\AdminSection"]],"And 10 more entries, set log level to debug to see all entries"],"logging","admin","admin"]},{"file":"/usr/local/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":78,"function":"formatAdminSections","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","logging"]},{"file":"/usr/local/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":164,"function":"getNavigationParameters","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","logging"]},{"file":"/usr/local/www/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php","line":77,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","logging"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["logging"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\AdminSettingsController"],"index"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\AdminSettingsController"],"index"]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AdminSettingsController","index",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["logging","settings.adminsettings.index"]]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/admin/logging"]},{"file":"/usr/local/www/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/apps/passwords/lib/Services/EnvironmentService.php","Line":398,"message":"Unable to verify user XXXX","exception":{},"CustomMessage":"Unable to verify user XXXX"}}