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

If a folder has a file/folder with non-UTF-8 in its name, its contents can't be listed in the webinterface #20880

Closed
eaon opened this issue Dec 1, 2015 · 5 comments

Comments

@eaon
Copy link

eaon commented Dec 1, 2015

Steps to reproduce

  1. Mount local external storage /Folder
  2. Create a folder with some non-UTF-8 encoding $ mkdir ex$'\366'mple in /Folder
  3. Try to browse /Folder with the owncloud webinterface

Expected behaviour

Show folder contents even with the bad encoding

Actual behaviour

In the browser, the view jumps back to the folder you tried to originally access it from. ajax/list.php response is empty but 200 OK. WebDAV is fine.

Server configuration

Operating system: Debian Jessie

Web server: nginx/1.6.2

Database: SQLite

PHP version: PHP 5.6.14-0+deb8u1 (cli) (built: Oct 4 2015 16:13:10)

ownCloud version: 8.2.1

Updated from an older ownCloud or fresh install: Fresh

List of activated apps:

Enabled:
  - activity: 2.1.3
  - contacts: 0.5.0.0
  - documents: 0.11.0
  - files: 1.2.0
  - files_external: 0.3.0
  - files_pdfviewer: 0.7
  - files_sharing: 0.7.0
  - files_texteditor: 2.0
  - files_trashbin: 0.7.0
  - files_versions: 1.1.0
  - files_videoviewer: 0.1.3
  - gallery: 14.2.0
  - notifications: 0.1.0
  - provisioning_api: 0.3.0
  - templateeditor: 0.1
  - updater: 0.6
Disabled:
  - encryption
  - external
  - firstrunwizard
  - user_external
  - user_ldap

The content of config/config.php:

{
    "system": {
        "instanceid": "octcrx65ami3",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "\/var\/local\/cloud\/",
        "overwritewebroot": "\/oc",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "sqlite3",
        "version": "8.2.1.4",
        "logtimezone": "UTC",
        "installed": true,
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379,
            "timeout": 0
        },
        "loglevel": 3
    }
}

Are you using external storage, if yes which one: local

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Logs

Web server error log

Doesn't write anything to the error log.

ownCloud log (data/owncloud.log)

The request doesn't write anything to the log.

Browser log

$ curl -i "https://user:password@server/index.php/apps/files/ajax/list.php?dir=/Folder&sort=name&sortdirection=asc"
HTTP/1.1 200 OK
Strict-Transport-Security: max-age=31536000
Server: nginx/1.6.2
Date: Tue, 01 Dec 2015 18:23:24 GMT
Content-Type: application/json; charset=utf-8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: oc_sessionPassphrase=sbijrXTz6Q0CDIHc0dYrJHuRsMXdq5cDHv4%2Fo5UwUccJjh9DaQbVKE%2BfpR%2FljSDv4b9NSfp7h4ETk%2F0jEMQFQv%2FpridugmOBDlFNxhiC90vd%2B9onCxxvNtAPgdlolxbi; path=/oc; secure; httponly
Set-Cookie: octcrx65ami3=sfgdugigqsg9ngsvtt5m78mbn5; path=/oc; secure; HttpOnly
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: Sameorigin
X-Robots-Tag: none
Transfer-Encoding: chunked

(The response is empty but it says 200 OK)

@eaon eaon changed the title If a folder has a file/folder with non-UTF-8 in its name, it can't be listed in the webinterface If a folder has a file/folder with non-UTF-8 in its name, its contents can't be listed in the webinterface Dec 1, 2015
@PVince81
Copy link
Contributor

PVince81 commented Dec 2, 2015

This is likely a duplicate of #20824.
The server needs to handle such errors more gracefully.

@eaon
Copy link
Author

eaon commented Dec 2, 2015

Hm I'm not sure it's exactly the same. I have umlauts that are listed fine, but with ex$'\366'mple the entire folder won't show its listing.

@PVince81
Copy link
Contributor

PVince81 commented Dec 2, 2015

It is the same.

Originally we thought it was an umlaut issue but in the end it turned
out to be the contents of the folder which had files with the \x08 character

@ma-schmid
Copy link

how could you get a file name with \x08 character created accidentially? Is this a encoding issue?

@lock
Copy link

lock bot commented Aug 7, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants