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

Folders with spaces at the end of the name can not be accessed through the Windows Explorer #28164

Closed
HarrySTrueman opened this issue Jun 20, 2017 · 6 comments

Comments

@HarrySTrueman
Copy link

HarrySTrueman commented Jun 20, 2017

Steps to reproduce

  1. Open a browser and log in to owncloud
  2. Create a new folder with name "test "
  3. Open the folder and upload one file
  4. On Windows open the Windows Explorer (Win+E) and open the WebDav URL for your owncloud instance
  5. Click on the new foldername ("test ")

Expected behaviour

The uploaded file should be listed inside the Windows Explorer.

Actual behaviour

An empty folder is shown. If you remove the space at the end of the foldername, then the file will be shown in the Windows Explorer.

Server configuration

Operating system: Debian 7.11

Web server: Apache 2.2.22

Database: MySQL 5.5.55-0+deb7u1

PHP version: 5.4.45-0+deb7u8

ownCloud version: 9.1.6

Updated from an older ownCloud or fresh install: Updated from 9.1.5

Where did you install ownCloud from: https://download.owncloud.org/community/owncloud-9.1.6.tar.bz2

Signing status (ownCloud 9.0 and above):

The content of config/config.php:

{
    "system": {
        "maintenance": false,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "9.1.6.2",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "forcessl": true,
        "logtype": "owncloud",
        "logfile": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 0,
        "logdateformat": "Y-m-d H:i:s",
        "default_language ": "de",
        "mail_smtpmode": "php",
        "mail_smtphost": "127.0.0.1",
        "mail_smtpport": "25",
        "mail_smtptimeout": 10,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpdebug": true,
        "remember_login_cookie_lifetime": 86400,
        "session_lifetime": 43200,
        "appstoreenabled": true,
        "appcodechecker": true,
        "apps_paths": [
            {
                "path": "***REMOVED SENSITIVE VALUE***",
                "url": "\/apps",
                "writable": true
            }
        ],
        "theme": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "secret": "***REMOVED SENSITIVE VALUE***",
        "share_folder": "\/Shared",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "forceSSLforSubdomains": true,
        "memcache.local": "\\OC\\Memcache\\APC",
        "trashbin_retention_obligation": "auto",
        "appstore.experimental.enabled": true,
        "activity_expire_days": "90"
    }
}

List of activated apps:

  • activity: 2.3.2
  • comments: 0.3.0
  • configreport: 0.1.1
  • dav: 0.2.7
  • disablerememberlogin: 0.3
  • external: 1.2
  • federatedfilesharing: 0.3.0
  • federation: 0.1.0
  • files: 1.5.1
  • files_sharing: 0.10.0
  • files_texteditor: 2.1
  • files_trashbin: 0.9.0
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • logreader: 1.1.5
  • notifications: 0.3.0
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • templateeditor: 0.1
  • updatenotification: 0.2.1

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

Are you using encryption: no

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

Client configuration

Browser: Any

Operating system: Windows 7

Logs

Web server error log

123.123.123.123 - testuser [20/Jun/2017:10:13:33 +0200] "PROPFIND /remote.php/webdav/TEST HTTP/1.1" 404 1131 "-" "Microsoft-WebDAV-MiniRedir/6.1.7601"

ownCloud log (data/owncloud.log)

{"reqId":"/A4zGRanrDTi9wv1eFn6","remoteAddr":"123.123.123.123","app":"webdav","message":"Exception: {"Message":"HTTP/1.1 404 File with name TEST could not be located","Exception":"Sabre\DAV\Exception\NotFound","Code":0,"Trace":"
#0 /path/to/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(903): OCA\DAV\Connector\Sabre\ObjectTree->getNodeForPath('TEST')
#1 /path/to/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(334): Sabre\DAV\Server->getPropertiesForPath('TEST', Array, 1)
#2 [internal function]: Sabre\DAV\CorePlugin->httpPropFind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#3 /path/to/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#4 /path/to/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(459): Sabre\Event\EventEmitter->emit('method:PROPFIND', Array)
#5 /path/to/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#6 /path/to/owncloud/apps/dav/appinfo/v1/webdav.php(61): Sabre\DAV\Server->exec()
#7 /path/to/owncloud/remote.php(164): require_once('/path/to/ow...')
#8 {main}","File":"/path/to/owncloud/apps/dav/lib/Connector/Sabre/ObjectTree.php","Line":170,"User":"testuser"}","level":0,"time":"2017-06-20 10:13:33","method":"PROPFIND","url":"/remote.php/webdav/TEST","user":"testuser"}

Browser log

@michaelstingl
Copy link

Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not. However, it is acceptable to specify a period as the first character of a name. For example, ".temp".

(found in MSDN: Naming Files, Paths, and Namespaces)

@HarrySTrueman
Copy link
Author

This could be prevented by the owncloud WebFrontend. At the moment such filenames are allowed.

@PVince81
Copy link
Contributor

I'm ok with preventing this in the frontend

@cdamken
Copy link
Contributor

cdamken commented Jun 21, 2018

Problem still exist:

grafik

Error Message: Filename ends with a space.

OC 10.0.7 in docker on ubuntu.

Desktop Client 2.4.1

@michaelstingl
Copy link

@stale
Copy link

stale bot commented Sep 21, 2021

This issue has been automatically closed.

@stale stale bot closed this as completed Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants