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

Uploading zero byte length file via webdav to s3 primary or external storage files (deleting files fails, too) #14192

Closed
LutzFinsterle2019 opened this issue Feb 14, 2019 · 1 comment
Assignees
Milestone

Comments

@LutzFinsterle2019
Copy link

Steps to reproduce

  1. upload zero byte length file to Nextcloud to primary or external S3 Storage

Expected behaviour

Empty file should be uploaded

Actual behaviour

The following error is shown, and file does not turn up
[webdav] Fatal: Sabre\DAV\Exception: An exception occurred while completing a multipart upload: Error executing "CompleteMultipartUpload" on "https://crgw.itc.global.mahle/nextcloudcluster/urn%3Aoid%3A3099037?uploadId=2~Ok8YksG_8OK2jnjSoe0EyMQawpoq3PX"; AWS HTTP error: Client error: POST https://crgw.itc.global.mahle/nextcloudcluster/urn%3Aoid%3A3099037?uploadId=2~Ok8YksG_8OK2jnjSoe0EyMQawpoq3PX resulted in a 400 Bad Request response:

MalformedXMLnextcloudclusterMalformedXML (client): - MalformedXMLnextcloudclustertx000000000000000103796-005c651fb6-b261918-destb261918-dest-de at <>

  1. /var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 209
    convertToSabreException(Aws\S3\Exception ... {})
  2. /var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 156
    put(null)
  3. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
    createFile("New Text Document.txt", null)
  4. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
    createFile("Photos/New Text Document.txt", null, null)
  5. <>
    httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  6. /var/www/html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    call_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
  7. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    emit("method:PUT", [Sabre\HTTP\Requ ... }])
  8. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  9. /var/www/html/nextcloud/apps/dav/appinfo/v1/webdav.php line 80
    exec()
  10. /var/www/html/nextcloud/remote.php line 163
    require_once("/var/www/html/n ... p")

PUT /remote.php/webdav/Photos/New%20Text%20Document.txt
from 10.145.60.164 by 27EB840B-643D-495C-A770-1B7CB954E14E at 2019-02-14T07:58:46+00:00

Server configuration

Operating system:
CentOS Linux release 7.6.1810 (Core)

Web server:
httpd-2.4.6-88.el7.centos.x86_64
Database:
mariadb cluster
PHP version:
php7.2
Nextcloud version: (see Nextcloud admin page)
15.004
Updated from an older Nextcloud/ownCloud or fresh install:
15.02
Where did you install Nextcloud from:
standard update repo

Signing status:

Signing status No errors have been found.

List of activated apps:

App list

Accessibility
1.1.0
Official
Activity
2.8.2
Official
Auditing / Logging
1.5.0
Official
Circles
0.16.0
Official
Collaborative tags
1.5.0
Official
Comments
1.5.0
Official
Deleted files
1.5.0
Official
External storage support
1.6.0
Official
Federation
1.5.0
Official
File access control
1.5.0
Official
File sharing
1.7.0
Official
Files automated tagging
1.5.0
Official
First run wizard
2.4.0
Official
Gallery
18.2.0
Official
LDAP user and group backend
1.5.0
Official
Log Reader
2.0.0
Official
Markdown Editor
2.0.5
Monitoring
1.5.0
Official
Nextcloud announcements
1.4.0
Official
Notifications
2.3.0
Official
Password policy
1.5.0
Official
PDF viewer
1.4.0
Official
README.md
1.0.1
Share by mail
1.5.0
Official
Support
1.0.0
Official
Text editor
2.7.0
Official
Theming
1.6.0
Official
Update notification
1.5.0
Official
Usage survey
1.3.0
Official
Versions
1.8.0
Official
Video player
1.4.0
Official
Default encryption module
2.3.0
Official
Workflow external scripts

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

{ "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "dest-docl03.itc.global.mahle", "dest-docllb1.itc.global.mahle", "intmcs.mahle.com" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "tempdirectory": "\/var\/big_temp_file\/", "overwrite.cli.url": "https:\/\/intmcs.mahle.com", "dbtype": "mysql", "version": "15.0.4.0", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "3306", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "memcache.local": "\\OC\\Memcache\\Redis", "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379, "timeout": 0 }, "log_type": "file", "loglevel": 2, "logfile": "\/nextcloud_data\/data\/nextcloud.log", "log_rotate_size": 104857600, "mail_smtpmode": "smtp", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "mail_smtpauthtype": "LOGIN", "objectstore": { "class": "OC\\Files\\ObjectStore\\S3", "arguments": { "bucket": "nextcloudcluster", "autocreate": true, "key": "8rMTVnPGQCGwNvdKstNi", "secret": "", "hostname": "crgw.itc.global.mahle", "port": 443, "use_ssl": true, "region": "optional", "use_path_style": true } }, "auth.bruteforce.protection.enabled": false, "updater.release.channel": "stable", "maintenance": false, "ldapIgnoreNamingRules": false, "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory", "proxy": "dest-prxl00.itc.global.mahle:3128", "lost_password_link": "https:\/\/intmcs.mahle.com\/password_reset.html", "theme": "", "mail_sendmailmode": "smtp" } }

Are you using external storage, if yes which one: local/smb/sftp/...
S3

Are you using encryption:
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
LDAP AD connect

LDAP configuration (delete this part if not used)

LDAP config +-------------------------------+-------------------------------------------------------------------------------+ | Configuration | | +-------------------------------+-------------------------------------------------------------------------------+ | hasMemberOfFilterSupport | 1 | | homeFolderNamingRule | | | lastJpegPhotoLookup | 0 | | ldapAgentName | cn=S0002190,ou=system,ou=users,ou=st,ou=de,ou=mahle,DC=itc,DC=global,DC=mahle | | ldapAgentPassword | *** | | ldapAttributesForGroupSearch | | | ldapAttributesForUserSearch | mail;givenname;sn | | ldapBackupHost | | | ldapBackupPort | | | ldapBase | DC=global,DC=mahle | | ldapBaseGroups | DC=global,DC=mahle | | ldapBaseUsers | DC=global,DC=mahle | | ldapCacheTTL | 600 | | ldapConfigurationActive | 1 | | ldapDefaultPPolicyDN | | | ldapDynamicGroupMemberURL | | | ldapEmailAttribute | Mail | | ldapExperiencedAdmin | 1 | | ldapExpertUUIDGroupAttr | | | ldapExpertUUIDUserAttr | | | ldapExpertUsernameAttr | | | ldapGidNumber | gidNumber | | ldapGroupDisplayName | cn | | ldapGroupFilter | | | ldapGroupFilterGroups | | | ldapGroupFilterMode | 1 | | ldapGroupFilterObjectclass | | | ldapGroupMemberAssocAttr | member | | ldapHost | ldaps://10.200.95.191 | | ldapIgnoreNamingRules | | | ldapLoginFilter | (&(|(objectclass=person)(objectclass=user))(samaccountname=%uid)) | | ldapLoginFilterAttributes | | | ldapLoginFilterEmail | 0 | | ldapLoginFilterMode | 1 | | ldapLoginFilterUsername | 1 | | ldapNestedGroups | 0 | | ldapOverrideMainServer | | | ldapPagingSize | 500 | | ldapPort | 3269 | | ldapQuotaAttribute | | | ldapQuotaDefault | | | ldapTLS | 0 | | ldapUserAvatarRule | default | | ldapUserDisplayName | mail | | ldapUserDisplayName2 | | | ldapUserFilter | (&(|(sAMAccountType=805306368))) | | ldapUserFilterGroups | | | ldapUserFilterMode | 1 | | ldapUserFilterObjectclass | person | | ldapUuidGroupAttribute | auto | | ldapUuidUserAttribute | auto | | turnOffCertCheck | 0 | | turnOnPasswordChange | 0 | | useMemberOfToDetectMembership | 1 | +-------------------------------+-------------------------------------------------------------------------------+ ```

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log No relevant entries

Nextcloud log (data/nextcloud.log)

Nextcloud log [webdav] Fatal: Sabre\DAV\Exception: An exception occurred while completing a multipart upload: Error executing "CompleteMultipartUpload" on "https://crgw.itc.global.mahle/nextcloudcluster/urn%3Aoid%3A3099037?uploadId=2~Ok8YksG_8OK2jnjSoe0EyMQawpoq3PX"; AWS HTTP error: Client error: `POST https://crgw.itc.global.mahle/nextcloudcluster/urn%3Aoid%3A3099037?uploadId=2~Ok8YksG_8OK2jnjSoe0EyMQawpoq3PX` resulted in a `400 Bad Request` response: MalformedXMLnextcloudclusterMalformedXMLnextcloudclustertx000000000000000103796-005c651fb6-b261918-destb261918-dest-de at <>
  1. /var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 209
    convertToSabreException(Aws\S3\Exception ... {})
  2. /var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 156
    put(null)
  3. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
    createFile("New Text Document.txt", null)
  4. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
    createFile("Photos/New Text Document.txt", null, null)
  5. <>
    httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  6. /var/www/html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    call_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
  7. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    emit("method:PUT", [Sabre\HTTP\Requ ... }])
  8. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  9. /var/www/html/nextcloud/apps/dav/appinfo/v1/webdav.php line 80
    exec()
  10. /var/www/html/nextcloud/remote.php line 163
    require_once("/var/www/html/n ... p")

PUT /remote.php/webdav/Photos/New%20Text%20Document.txt
from 10.145.60.164 by 27EB840B-643D-495C-A770-1B7CB954E14E at 2019-02-14T07:58:46+00:00

Browser log

Browser log N/a
@LutzFinsterle2019 LutzFinsterle2019 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Feb 14, 2019
@LutzFinsterle2019
Copy link
Author

Additional Config Infos

Server configuration detail

Operating system: Linux 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64

Webserver: Apache (fpm-fcgi)

Database: mysql 10.2.14

PHP version: 7.2.14

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, cgi-fcgi, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, intl, json, ldap, exif, mysqlnd, PDO, Phar, posix, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlwriter, xsl, mcrypt, mysqli, pdo_mysql, pdo_sqlite, wddx, xmlreader, apcu, igbinary, imagick, smbclient, zip, redis, libsmbclient, Zend OPcache

Nextcloud version: 15.0.4 - 15.0.4.0

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array ( )

List of activated apps

Enabled:

  • accessibility: 1.1.0
  • activity: 2.8.2
  • admin_audit: 1.5.0
  • circles: 0.16.0
  • cloud_federation_api: 0.1.0
  • comments: 1.5.0
  • dav: 1.8.1
  • federatedfilesharing: 1.5.0
  • federation: 1.5.0
  • files: 1.10.0
  • files_accesscontrol: 1.5.0
  • files_automatedtagging: 1.5.0
  • files_external: 1.6.0
  • files_markdown: 2.0.5
  • files_pdfviewer: 1.4.0
  • files_readmemd: 1.0.1
  • files_sharing: 1.7.0
  • files_texteditor: 2.7.0
  • files_trashbin: 1.5.0
  • files_versions: 1.8.0
  • files_videoplayer: 1.4.0
  • firstrunwizard: 2.4.0
  • gallery: 18.2.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.3.0
  • nextcloud_announcements: 1.4.0
  • notifications: 2.3.0
  • oauth2: 1.3.0
  • password_policy: 1.5.0
  • provisioning_api: 1.5.0
  • serverinfo: 1.5.0
  • sharebymail: 1.5.0
  • support: 1.0.0
  • survey_client: 1.3.0
  • systemtags: 1.5.0
  • theming: 1.6.0
  • twofactor_backupcodes: 1.4.1
  • updatenotification: 1.5.0
  • user_ldap: 1.5.0
  • workflowengine: 1.5.0
    Disabled:
  • encryption
  • workflow_script
Configuration (config/config.php)

{
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"dest-docl03.itc.global.mahle",
"dest-docllb1.itc.global.mahle",
"intmcs.mahle.com"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"tempdirectory": "/var/big_temp_file/",
"overwrite.cli.url": "https://intmcs.mahle.com",
"dbtype": "mysql",
"version": "15.0.4.0",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "3306",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"memcache.local": "\OC\Memcache\Redis",
"memcache.distributed": "\OC\Memcache\Redis",
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "REMOVED SENSITIVE VALUE",
"port": 6379,
"timeout": 0
},
"log_type": "file",
"loglevel": 2,
"logfile": "/nextcloud_data/data/nextcloud.log",
"log_rotate_size": 104857600,
"mail_smtpmode": "smtp",
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "25",
"mail_smtpauthtype": "LOGIN",
"objectstore": {
"class": "OC\Files\ObjectStore\S3",
"arguments": {
"bucket": "nextcloudcluster",
"autocreate": true,
"key": "8rMTVnPGQCGwNvdKstNi",
"secret": "ShZlezCulh3i3wspXGZA5nGBxcDXemluJzazJgC1",
"hostname": "crgw.itc.global.mahle",
"port": 443,
"use_ssl": true,
"region": "optional",
"use_path_style": true
}
},
"auth.bruteforce.protection.enabled": false,
"updater.release.channel": "stable",
"maintenance": false,
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "\OCA\User_LDAP\LDAPProviderFactory",
"proxy": "dest-prxl00.itc.global.mahle:3128",
"lost_password_link": "https://intmcs.mahle.com/password_reset.html",
"theme": "",
"mail_sendmailmode": "smtp"
}

Are you using external storage, if yes which one: Array ( [0] => \OC\Files\Storage\Local [1] => \OCA\Files_External\Lib\Storage\FTP [2] => \OC\Files\Storage\DAV [3] => \OCA\Files_External\Lib\Storage\OwnCloud [4] => \OCA\Files_External\Lib\Storage\SFTP [5] => \OCA\Files_External\Lib\Storage\AmazonS3 [6] => \OCA\Files_External\Lib\Storage\Swift [7] => \OCA\Files_External\Lib\Storage\SFTP [8] => \OCA\Files_External\Lib\Storage\SMB [9] => \OCA\Files_External\Lib\Storage\SMB )

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM oc_appconfig WHERE appid = 'user_ldap';

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0

@rullzer rullzer added regression and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Feb 14, 2019
@rullzer rullzer self-assigned this Feb 14, 2019
@rullzer rullzer added this to the Nextcloud 16 milestone Feb 14, 2019
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

2 participants