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]: Cannot restore a file from trashbin with specal characters in filename #40178

Closed
6 of 8 tasks
dev4223 opened this issue Aug 31, 2023 · 5 comments
Closed
6 of 8 tasks
Labels
1. to develop Accepted and waiting to be taken care of 27-feedback bug feature: trashbin

Comments

@dev4223
Copy link

dev4223 commented Aug 31, 2023

⚠️ This issue respects the following points: ⚠️

Bug description

I cannot restore a file from trashbin, when it has special characters like "ä ö ü ß" in filename.

It doesn't depend, whether the file was stored in personal or group folder.

Steps to reproduce

  1. Take a PDF file "filetorestore.pdf" in root folder. Delete it. Goto trashbin and restore the file. Result: File is restored in root folder.
  2. Copy this file to a group folder. Delete it from the group folder. Goto trashbin and restore the file. Result: File is restored in group folder.
  3. Rename this file in root folder to "filetorestore äöü.pdf". Delete it. Goto trashbin and press "Restore". Result: Error Message: "Restore" failed for some items.

Expected behavior

Restore the file at the last location.

Installation method

Community Manual installation with Archive

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

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

Updated from a MINOR version (ex. 22.1 to 22.2)

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": [
            "cloud.dsob.loc",
            "dsob-srv-lx02.dsob.loc"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "skeletondirectory": "\/var\/www\/data\/nextcloud\/skeleton",
        "dbtype": "mysql",
        "version": "27.0.2.1",
        "overwrite.cli.url": "https:\/\/cloud.intra.loc\/",
        "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,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "default_phone_region": "DE",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "mail_smtpmode": "sendmail",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [
            "admin"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.19.0
  - announcementcenter: 6.6.2
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.3.2
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - deck: 1.10.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_markdown: 2.4.1
  - files_pdfviewer: 2.8.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - forms: 3.3.1
  - groupfolders: 15.0.2
  - ldap_contacts_backend: 1.7.0
  - ldap_write_support: 1.9.0
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.16.0
  - notes: 4.8.1
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - onlyoffice: 8.2.0
  - password_policy: 1.17.0
  - photos: 2.3.0
  - polls: 5.2.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recognize: 4.3.2
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - sendent: 2.0.4
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - spreed: 17.0.3
  - support: 1.10.0
  - survey_client: 1.15.0
  - suspicious_login: 5.0.0
  - systemtags: 1.17.0
  - tasks: 0.15.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - twofactor_totp: 9.0.0
  - updatenotification: 1.17.0
  - user_ldap: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - admin_audit: 1.17.0
  - bruteforcesettings: 2.7.0
  - collectives: 2.7.0 (installed 2.7.0)
  - encryption: 2.15.0
  - files_external: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"FvM1APSpfL27uXJE83oQ","level":3,"time":"2023-08-31T11:24:09+00:00","remoteAddr":"[ipaddress]","user":"[userid]","app":"webdav","method":"MOVE","url":"/remote.php/dav/trashbin/[userid]/trash/filetorestore%20%C3%A4%C3%B6%C3%BC.pdf.d1693481042","message":"parse_url(): Argument #1 ($url) must be of type string, null given","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0","version":"27.0.2.1","exception":{"Exception":"TypeError","Message":"parse_url(): Argument #1 ($url) must be of type string, null given","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/3rdparty/sabre/uri/lib/functions.php","line":196,"function":"parse_url"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/uri/lib/functions.php","line":114,"function":"Sabre\\Uri\\parse"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":565,"function":"Sabre\\Uri\\normalize"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":727,"function":"calculateUri","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":590,"function":"getCopyAndMoveInfo","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/remote.php","line":172,"args":["/var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/3rdparty/sabre/uri/lib/functions.php","Line":196,"message":"parse_url(): Argument #1 ($url) must be of type string, null given","exception":[],"CustomMessage":"parse_url(): Argument #1 ($url) must be of type string, null given"},"id":"64f07a3e77f6b"}

Additional info

No response

@dev4223 dev4223 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Aug 31, 2023
@joshtrichards
Copy link
Member

Hi @dev4223 - Thanks for your report. Does your browser console have the following message during these events by chance?

[ERROR] files: TypeError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': String contains non ISO-8859-1 code point

If so, this is fixed in #39842 which will be released in NC27.1 in the second half of September.

@dev4223
Copy link
Author

dev4223 commented Aug 31, 2023

Hi, @joshtrichards , thanks, but unfortunately not. The console message is:

[ERROR] files: AxiosError: Request failed with status code 500 .

I can download the file with the trashbin url but restore throws this error.

@caiotadashi
Copy link

caiotadashi commented Aug 31, 2023

Same here.

I'm needing to restore some files but i'm unable to restore those with special characters (ç, á, à, ã, é, õ).

Same console message:

[ERROR] files: AxiosError: Request failed with status code 500

Running Nextcloud Hub version 27.0.2

There's any workaround to restore those files on their original locations?

@joshtrichards joshtrichards added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info labels Aug 31, 2023
@caiotadashi
Copy link

For information: I was able to restore the files using the iOS app.

@dev4223
Copy link
Author

dev4223 commented Sep 19, 2023

The bug is resolved for me in v27.1.0.
Thanks a lot!

@dev4223 dev4223 closed this as completed Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of 27-feedback bug feature: trashbin
Projects
None yet
Development

No branches or pull requests

4 participants