nextcloud / nextcloud/server

Locale for external SMB Storage is hardcoded to en_US.UTF-8

Open
#3,299 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: external storage feature: language/translations (l10n/i18n) hotspot: filename handling
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Steps to reproduce
  1. Enable External Storage App
  2. Add a SMB-Folder with a non en_US filesystem
    3.Browser a golder with files that include special chars like german ßöäü in their name
Expected behaviour

All files should be listed with proper names

Actual behaviour

Not all files are listet. Filenames are cut of on any occurrence of a special char and the name of the next file is attended. Both files are presented as one.

In /var/www/owncloud/apps/files_external/3rdparty/icewind/smb/src/Server.php the is a hardcoded value for the constant LOCALE. After changing it to 'de_DE.UTF-8' everything works as expected.

Server configuration

Operating system: Debian GNU/Linux stretch/sid

Web server: Apache2

Database: MySQL

PHP version: PHP 5.6.29-0+deb8u1

Nextcloud version: (see Nextcloud admin page) 11.0.1 (stable)

Updated from an older Nextcloud/ownCloud or fresh install: fresh install

Where did you install Nextcloud from: Nextcloud download page

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.4.1
  - comments: 1.1.0
  - dav: 1.1.1
  - federatedfilesharing: 1.1.1
  - federation: 1.1.1
  - files: 1.6.1
  - files_external: 1.1.2
  - files_pdfviewer: 1.0.1
  - files_sharing: 1.1.1
  - files_texteditor: 2.2
  - files_trashbin: 1.1.0
  - files_versions: 1.4.0
  - files_videoplayer: 1.0.0
  - firstrunwizard: 2.0
  - gallery: 16.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - nextcloud_announcements: 1.0
  - notifications: 1.0.1
  - password_policy: 1.1.0
  - provisioning_api: 1.1.0
  - serverinfo: 1.1.1
  - sharebymail: 1.0.1
  - survey_client: 0.1.5
  - systemtags: 1.1.3
  - theming: 1.1.1
  - twofactor_backupcodes: 1.0.0
  - twofactor_totp: 1.0.0
  - updatenotification: 1.1.1
  - workflowengine: 1.1.1
Disabled:
  - admin_audit
  - encryption
  - external
  - files_accesscontrol
  - files_automatedtagging
  - files_retention
  - templateeditor
  - user_external
  - user_ldap
  - user_saml

The content of config/config.php:

Config report

{
"system": {
"instanceid": "oc1folidbcbc",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"cloud.gsurf.de"
],
"datadirectory": "/var/www/nextcloud/data",
"overwrite.cli.url": "http://portal.gsurf.de/nextcloud",
"dbtype": "mysql",
"dbname": "nextcloud",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"version": "11.0.1.2",
"logtimezone": "UTC",
"installed": true,
"dbport": "",
"mail_from_address": "share",
"mail_smtpmode": "php",
"mail_domain": "gsurf.de",
"memcache.local": "\OC\Memcache\APCu",
"default_language": "de"
},
"apps": {
"activity": {
"enabled": "yes",
"installed_version": "2.4.1",
"types": "filesystem"
},
"backgroundjob": {
"lastjob": "4"
},
"comments": {
"enabled": "yes",
"installed_version": "1.1.0",
"types": "logging"
},
"core": {
"installedat": "1485434580.9819",
"lastcron": "1485544831",
"lastupdateResult": "[]",
"lastupdatedat": "1485544331",
"oc.integritycheck.checker": "[]",
"public_files": "files_sharing/public.php",
"public_webdav": "dav/appinfo/v1/publicwebdav.php",
"shareapi_allow_public_upload": "no",
"shareapi_allow_resharing": "no",
"shareapi_default_expire_date": "yes",
"shareapi_enforce_expire_date": "yes",
"shareapi_enforce_links_password": "yes"
},
"dav": {
"enabled": "yes",
"installed_version": "1.1.1",
"types": "filesystem"
},
"federatedfilesharing": {
"enabled": "yes",
"installed_version": "1.1.1",
"types": ""
},
"federation": {
"enabled": "yes",
"installed_version": "1.1.1",
"types": "authentication"
},
"files": {
"cronjob_scan_files": "500",
"enabled": "yes",
"installed_version": "1.6.1",
"types": "filesystem"
},
"files_external": {
"enabled": "yes",
"installed_version": "1.1.2",
"types": "filesystem"
},
"files_pdfviewer": {
"enabled": "yes",
"installed_version": "1.0.1",
"ocsid": "166049",
"types": ""
},
"files_sharing": {
"enabled": "yes",
"incoming_server2server_share_enabled": "no",
"installed_version": "1.1.1",
"outgoing_server2server_share_enabled": "no",
"types": "filesystem"
},
"files_texteditor": {
"enabled": "yes",
"installed_version": "2.2",
"ocsid": "166051",
"types": ""
},
"files_trashbin": {
"enabled": "yes",
"installed_version": "1.1.0",
"types": "filesystem"
},
"files_versions": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": "filesystem"
},
"files_videoplayer": {
"enabled": "yes",
"installed_version": "1.0.0",
"types": ""
},
"firstrunwizard": {
"enabled": "yes",
"installed_version": "2.0",
"types": "logging"
},
"gallery": {
"enabled": "yes",
"installed_version": "16.0.0",
"types": ""
},
"logreader": {
"enabled": "yes",
"installed_version": "2.0.0",
"ocsid": "170871",
"types": ""
},
"lookup_server_connector": {
"enabled": "yes",
"installed_version": "1.0.0",
"types": "authentication"
},
"nextcloud_announcements": {
"enabled": "yes",
"installed_version": "1.0",
"pub_date": "Sat, 10 Dec 2016 00:00:00 +0100",
"types": "logging"
},
"notifications": {
"enabled": "yes",
"installed_version": "1.0.1",
"types": "logging"
},
"password_policy": {
"enabled": "yes",
"installed_version": "1.1.0",
"types": ""
},
"provisioning_api": {
"enabled": "yes",
"installed_version": "1.1.0",
"types": "prevent_group_restriction"
},
"serverinfo": {
"enabled": "yes",
"installed_version": "1.1.1",
"types": ""
},
"sharebymail": {
"enabled": "yes",
"installed_version": "1.0.1",
"types": "filesystem"
},
"survey_client": {
"enabled": "yes",
"installed_version": "0.1.5",
"types": ""
},
"systemtags": {
"enabled": "yes",
"installed_version": "1.1.3",
"types": "logging"
},
"theming": {
"enabled": "yes",
"installed_version": "1.1.1",
"types": "logging"
},
"twofactor_backupcodes": {
"enabled": "yes",
"installed_version": "1.0.0",
"types": ""
},
"twofactor_totp": {
"enabled": "yes",
"installed_version": "1.0.0",
"types": ""
},
"updatenotification": {
"enabled": "yes",
"installed_version": "1.1.1",
"types": ""
},
"workflowengine": {
"enabled": "yes",
"installed_version": "1.1.1",
"types": "filesystem"
}
}
}

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

Are you using encryption: no

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

Client configuration

Browser: IE11 / Chrome

Operating system: Windows10

Logs
Web server error log
Web server error log ``` Insert your webserver log here ```
Nextcloud log (data/nextcloud.log)
Nextcloud log ``` Insert your Nextcloud log here ```
Browser log
Browser log ``` Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

</details>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/files_external/3rdparty/icewind/smb/src/Server.php and inspect the hardcoded LOCALE value and how SMB filenames are read. Reproduce the issue with a non-en_US filesystem and filenames containing characters such as ßöäü. Done means external SMB listings preserve complete filenames instead of merging or truncating entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.