nextcloud / logreader

📜 Log reader for Nextcloud
59 stars 27 forks source link

[Bug]: Strange format text in “Security & setup warnings” message #1379

Closed dwprod38 closed 4 days ago

dwprod38 commented 2 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

Since update 29.0.7, I’ve noticed strange format text after date warning as shown in picture

IMG_9987

Steps to reproduce

  1. Go to “Administration settings”
  2. Under “Security & setup warnings”, wait warning message is displayed

Expected behavior

Message must be displayed with yellow color police “2 warnings in the logs since 14 September 2024, 09:50:52” instead of white color police “2 warnings in the logs since 14 September 2024, 09:50:52{"2":2,"3":0,"4":0}”

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MySQL

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

Updated from a MINOR version (ex. 28.0.1 to 28.0.2)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

root@nextcloudpiclone:/home/ncpadmin# sudo -u www-data php /var/www/nextcloud/occ config:list system
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "FR",
        "trusted_domains": {
            "0": "localhost",
            "7": "***REMOVED SENSITIVE VALUE***",
            "5": "nextcloudpiclone.local",
            "8": "nextcloudpiclone.lan",
            "3": "nextcloudpiclone",
            "11": "***REMOVED SENSITIVE VALUE***",
            "1": "192.168.1.38",
            "14": "nextcloudpiclone",
            "2": "***REMOVED SENSITIVE VALUE***"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.7.1",
        "overwrite.cli.url": "https:\/\/nextcloudpiclone\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/mnt\/SSDdrive\/ncdata\/data\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance_window_start": 1,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "logfile": "\/mnt\/SSDdrive\/ncdata\/data\/nextcloud.log",
        "theme": "",
        "loglevel": 2
    }
}

List of activated Apps

root@nextcloudpiclone:/home/ncpadmin# sudo -u www-data php /var/www/nextcloud/occ app:list 
Enabled:
  - activity: 2.21.1
  - calendar: 4.7.16
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.1
  - files_downloadlimit: 2.0.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - nextcloud_announcements: 1.18.0
  - notes: 4.11.0
  - notifications: 2.17.0
  - notify_push: 0.7.0
  - oauth2: 1.17.1
  - password_policy: 1.19.0
  - photos: 2.5.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - support: 1.12.0
  - survey_client: 1.17.0
  - systemtags: 1.19.0
  - tasks: 0.16.1
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - admin_audit: 1.19.0
  - bruteforcesettings: 2.9.0
  - encryption: 2.17.0
  - files_external: 1.21.0
  - nextcloudpi: 0.0.2
  - previewgenerator: 99.99.99
  - suspicious_login: 7.0.0
  - twofactor_totp: 11.0.0-dev
  - user_ldap: 1.20.0

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

joshtrichards commented 2 months ago

What do the two warning level log entries look like?

dwprod38 commented 2 months ago

What do the two warning level log entries look like?

Here the screen copy of log: IMG_9993

and Raw contents of three warnings messages:

{"reqId":"ZunCCtTC1t82SBOE-PVdgQAAEwc","level":2,"time":"2024-09-17T17:53:14+00:00","remoteAddr":"2a01:cb15:811b:9100:1c6e:7f54:ce5e:b13","user":"--","app":"no app in context","method":"POST","url":"/index.php/login","message":"Login failed: ncp (Remote IP: ***REMOVED SENSITIVE VALUE***)","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"29.0.7.1","data":[],"id":"66eeeac94bd1f"}

{"reqId":"ZunB_9TC1t82SBOE-PVdcgAACwA","level":2,"time":"2024-09-17T17:53:03+00:00","remoteAddr":"2a01:cb15:811b:9100:1c6e:7f54:ce5e:b13","user":"--","app":"no app in context","method":"POST","url":"/index.php/login","message":"Login failed: ncp (Remote IP: ***REMOVED SENSITIVE VALUE***)","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"29.0.7.1","data":[],"id":"66eeead34c947"}

{"reqId":"ZunB_9TC1t82SBOE-PVdcgAACwA","level":2,"time":"2024-09-17T17:53:03+00:00","remoteAddr":"2a01:cb15:811b:9100:1c6e:7f54:ce5e:b13","user":"--","app":"no app in context","method":"POST","url":"/index.php/login","message":"Login failed: ncp (Remote IP: ***REMOVED SENSITIVE VALUE***)","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"29.0.7.1","data":[],"id":"66eeeac94bd2b"}
rakekniven commented 1 week ago

Cannot confirm for v30.0.2

blizzz commented 5 days ago

I have spotted this once on a 30.0.2 instance. cc @Antreesy

joshtrichards commented 5 days ago

For what it's worth, I saw it ~last week on a v30.0.2 test instance, but didn't have the chance look closer. And, of course, now it's not doing it. So even though I can't reproduce it on-demand, I consider this reproduced and am labeling it as such.

blizzz commented 5 days ago

The text line should also be yellow. The timestamp cannot have the data in the curly brackets by default – it is just the timestamp from 7 days ago, otherwise no input or such that can lead to this strange representation. I am not sure this is really a fault of logreader, but perhaps another component or app that gets in between.

I cannot repro it on my instances either.

@dwprod38 if you can, could you perhaps use the browser's inspector and check the HTML and CSS of that line?

dwprod38 commented 5 days ago

Hello @blizzz,

Same issue displaying message on 4 devices as shown below : iOS18.1 - ipadOS18.1 - MacOSX-Chrome version 103.0.5060.134 - Linux/Chromium 130.0.6723.91

Warning messages works fine with Nextcloud 28.0.12, but issue started since Nextcloud 29.0.7 and 30

Iphone Image

iPad Image

MacBook/Chrome Image

Linux/Chromium Image

Regards

blizzz commented 4 days ago

Hm, when I look at the correct if branch, the scales fall off from my eyes.