nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.34k stars 4.06k forks source link

[Bug]: Extraneous escaping on file move dialog buttons #43329

Closed iw0nderhow closed 7 months ago

iw0nderhow commented 9 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

Folder names with apostrophes, etc. are shown with their escape sequences on the buttons in the move/copy dialog.

grafik

Steps to reproduce

  1. Create folder with apostrophe in name
  2. Try to move a file there
  3. ???

Expected behavior

The names in the buttons don't have extraneous escaping.

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

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

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "123.me",
            "234.cc",
            "345.me",
            "nextcloud-push-gateway",
            "456.me"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/123.me",
        "htaccess.RewriteBase": "\/",
        "dbtype": "mysql",
        "version": "28.0.2.5",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "loglevel": 0,
        "mail_smtpsecure": "ssl",
        "maintenance": false,
        "theme": "",
        "mysql.utf8mb4": true,
        "updater.release.channel": "stable",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\Imaginary",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\Krita",
            "OCA\\Richdocuments\\Preview\\OpenDocument",
            "OC\\Preview\\Movie",
            "OC\\Preview\\Font",
            "OCA\\Richdocuments\\Preview\\MSExcel",
            "OCA\\Richdocuments\\Preview\\MSWord",
            "OCA\\Richdocuments\\Preview\\OOXML",
            "OC\\Preview\\MSOffice2007",
            "OCA\\Richdocuments\\Preview\\EMF",
            "OCA\\Richdocuments\\Preview\\Pdf"
        ],
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "data-fingerprint": "492f75b5a90a929e7bff3609193fb862",
        "app_install_overwrite": [
            "dropit",
            "files_texteditor",
            "telephoneprovider",
            "keeporsweep",
            "previewgenerator",
            "twofactor_webauthn",
            "news"
        ],
        "default_phone_region": "DE",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "defaultapp": "files,dashboard",
        "maintenance_window_start": 2
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - bookmarks: 13.1.3
  - bruteforcesettings: 2.8.0
  - calendar: 4.6.4
  - camerarawpreviews: 0.8.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
  - data_request: 1.15.0
  - dav: 1.29.1
  - event_update_notification: 2.3.0
  - external: 5.3.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_automatedtagging: 1.18.0
  - files_external: 1.20.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_texteditor: 2.15.1
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - groupfolders: 16.0.3
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - maps: 1.3.1
  - news: 24.0.0
  - nextcloud_announcements: 1.17.0
  - notes: 4.9.2
  - notifications: 2.16.0
  - notify_push: 0.6.9
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - phonetrack: 0.7.7
  - photos: 2.4.0
  - previewgenerator: 5.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - qownnotesapi: 23.12.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.1
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.0
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - tasks: 0.15.0
  - telephoneprovider: 1.0.3
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_admin: 4.4.0
  - twofactor_backupcodes: 1.17.0
  - twofactor_totp: 10.0.0-beta.2
  - twofactor_webauthn: 1.3.2
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - announcementcenter: 6.7.0 (installed 6.7.0)
  - apporder: 0.15.0 (installed 0.15.0)
  - audioplayer: 3.4.1 (installed 3.4.1)
  - checksum: 1.2.3 (installed 1.2.3)
  - customproperties: 2.0.4 (installed 2.0.4)
  - drawio: 3.0.2 (installed 3.0.2)
  - dropit: 0.4.0 (installed 0.4.0)
  - encryption: 2.16.0
  - extract: 1.3.6 (installed 1.3.6)
  - files_downloadactivity: 1.16.0 (installed 1.16.0)
  - files_linkeditor: 1.1.16 (installed 1.1.16)
  - files_markdown: 2.4.1 (installed 2.4.1)
  - files_readmemd: 2.0.1 (installed 2.0.1)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - integration_mastodon: 2.0.3 (installed 2.0.3)
  - keeporsweep: 0.3.0 (installed 0.3.0)
  - metadata: 0.19.0 (installed 0.19.0)
  - polls: 6.0.1 (installed 6.0.1)
  - ransomware_protection: 1.14.0 (installed 1.14.0)
  - side_menu: 3.11.5 (installed 3.11.5)
  - socialsharing_email: 3.0.1 (installed 3.0.1)
  - spreed: 18.0.3 (installed 18.0.3)
  - suspicious_login: 6.0.0
  - tables: 0.6.6 (installed 0.6.6)
  - twofactor_nextcloud_notification: 3.8.0 (installed 3.8.0)
  - user_ldap: 1.19.0
  - user_saml: 6.1.1 (installed 6.1.1)
  - workflow_script: 1.13.0 (installed 1.13.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

The forum is broken right now, so I haven't searched it.

skjnldsv commented 9 months ago

@susnux

t('files', 'Move to {target}', { target }, undefined, { escape: false })

should do the trick? But this is direct user-input, I'm cautious :thinking:

susnux commented 8 months ago

If we pass it using v-text vue will escape HTML anyways. Otherwise we would need to pass the current result to v-html what I strongly recommend to NOT do.