owncloud / contacts

:busts_in_silhouette: Manage your CardDAV contacts from a feature-rich web-interface
75 stars 46 forks source link

PreconditionFailed when Adding contact in Contacts app #294

Closed meras1894 closed 8 years ago

meras1894 commented 8 years ago

Don't know if that's a problem of core or of contacts:

Steps to reproduce

  1. Adding new contact in Contacts App
  2. Switching to another site on owncloud
  3. Switching back to Contact App

    Expected behaviour

Contact should be there

Actual behaviour

Contact isn't there In Log, there is a "PreconditionFailed"-Error

Exception: {"Message":"HTTP\/1.1 412 An If-Match header was specified, but none of the specified the ETags matched.","Exception":"Sabre\DAV\Exception\PreconditionFailed","Code":0,"Trace":"#0 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(454): Sabre\DAV\Server->checkPreconditions(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#1 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#2 \/var\/www\/owncloud\/apps\/dav\/lib\/server.php(137): Sabre\DAV\Server->exec()\n#3 \/var\/www\/owncloud\/apps\/dav\/appinfo\/v2\/remote.php(29): OCA\DAV\Server->exec()\n#4 \/var\/www\/owncloud\/remote.php(138): require_once('\/var\/www\/ownclo...')\n#5 {main}","File":"\/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","Line":1267,"User":"admin"}

Server configuration

Operating system: Ubuntu 14.04

Web server: Apache 2.4

Database: MySQL 5.5.47

PHP version: PHP 5.5.9

ownCloud version: 9.0.0

Updated from an older ownCloud or fresh install: fresh install

Where did you install ownCloud from: https://download.owncloud.org/community/

Signing status (ownCloud 9.0 and above): No errors have been found

List of activated apps: Activity 2.2.1 Collaborative tags 0.2 Comments 0.2 Deleted files 0.8.0 Federation 0.0.4 First Run Wizard 1.1 Gallery 14.5.0 Mail Template Editor 0.1 Notifications 0.2.3 PDF Viewer 0.8 Provisioning API 0.4.1 Share Files 0.9.1 Text Editor 2.1 Update notification 0.1.0 Versions 1.2.0 Video player 0.9.8 Contacts 1.1.0.0

The content of config/config.php:

<?php $CONFIG = array ( 'instanceid' => 'oclugf1f04ph', 'passwordsalt' => ..., 'secret' => ..., 'trusted_domains' => array ( 0 => 'meineseite.com', ), 'datadirectory' => '/mnt/nfs/webserver_daten/ownclouddata', 'overwrite.cli.url' => 'https://meineseite.com', 'dbtype' => 'mysql', 'version' => '9.0.0.19', 'dbname' => 'ownclouddb', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc', 'dbuser' => 'owncloud', 'dbpassword' => ..., 'logtimezone' => 'UTC', 'installed' => true, 'loglevel' => 0, );

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: Google Chrome 49.0.2623.87

Operating system: Windows 10

other_vhosts_access.log: meineseite.com:443 11.111.11.11 - - [25/Mar/2016:10:40:51 +0100] "PUT /remote.php/dav/addressbooks/users/admin/Test/6db838e1-3f27-45e6-986e-33df2a837d99.vcf HTTP/1.1" 412 1183 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36" meineseite.com:443 11.111.11.11 - - [25/Mar/2016:10:41:01 +0100] "PUT /remote.php/dav/addressbooks/users/admin/Test/6db838e1-3f27-45e6-986e-33df2a837d99.vcf HTTP/1.1" 412 3515 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36" meineseite.com:443 11.111.11.11 - - [25/Mar/2016:10:41:07 +0100] "PUT /remote.php/dav/addressbooks/users/admin/Test/6db838e1-3f27-45e6-986e-33df2a837d99.vcf HTTP/1.1" 412 1321 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"

error.log: [Fri Mar 25 10:40:51.738993 2016] [apparmor:warn] pid 13831Operation not permitted: [client 11.111.111.11:53560] aa_change_hatv call failed [Fri Mar 25 10:40:51.763009 2016] [apparmor:warn] pid 15431Operation not permitted: [client 11.111.111.11:53557] aa_change_hatv call failed [Fri Mar 25 10:40:51.793416 2016] [apparmor:error] pid 13831Operation not permitted: [client 11.111.111.11:53560] Failed to change_hat to 'HANDLING_UNTRUSTED_INPUT' [Fri Mar 25 10:40:52.443446 2016] [apparmor:error] pid 15431Operation not permitted: [client 11.111.111.11:53557] Failed to change_hat to 'HANDLING_UNTRUSTED_INPUT' [Fri Mar 25 10:41:01.340145 2016] [apparmor:warn] pid 18476Operation not permitted: [client 11.111.111.11:53561] aa_change_hatv call failed [Fri Mar 25 10:41:01.468994 2016] [apparmor:error] pid 18476Operation not permitted: [client 11.111.111.11:53561] Failed to change_hat to 'HANDLING_UNTRUSTED_INPUT' [Fri Mar 25 10:41:07.746004 2016] [apparmor:warn] pid 13958Operation not permitted: [client 11.111.111.11:53562] aa_change_hatv call failed [Fri Mar 25 10:41:07.880046 2016] [apparmor:error] pid 13958Operation not permitted: [client 11.111.111.11:53562] Failed to change_hat to 'HANDLING_UNTRUSTED_INPUT'

modsec_audit.log: --f4979c52-A-- [25/Mar/2016:10:41:07 +0100] VvUHs8CoshUAADaGjasAAAAB 11.111.111.11 53562 192.168.0.87 443 --f4979c52-B-- PUT /remote.php/dav/addressbooks/users/admin/Test/6db838e1-3f27-45e6-986e-33df2a837d99.vcf HTTP/1.1 Host: meineseite.com Connection: keep-alive Content-Length: 129 Cache-Control: max-age=0 requesttoken: MEc9eDQ+TBsiGhxmcjEgGxwUQTcqKAcyLHdhPDkvLS0=:juJ3sn4be/EU1wGTvC0QlEiPJO/ZMwAnQSZC41MhVVE= Origin: https://meineseite.com If-Match: null User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 Content-Type: application/xml;charset=UTF-8 Accept: / Accept-Encoding: gzip, deflate, sdch Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4 Cookie: oc_sessionPassphrase=ZbbaKyH4BTJEvWND4uhvyoBjUafFB1kwsvY2yYIhOrX7ZBGsmbXkiT2lRsXAg%2Fs86psXUQAbMf0%2FbFJuyqNSbo6q0shihTyd9Zo3MYHXY%2FGbF0pBaB0FIn%2BOjUmVgTkf; oclugf1f04ph=6n18sm48df9v2lb739o5pg9lu0

--f4979c52-C-- BEGIN:VCARD VERSION:3.0 FN:Test CATEGORIES:Home UID:6db838e1-3f27-45e6-986e-33df2a837d99 TEL;TYPE=HOME\,VOICE:123 END:VCARD --f4979c52-F-- HTTP/1.1 412 Precondition failed Strict-Transport-Security: max-age=15768000 X-Powered-By: PHP/5.5.9-1ubuntu4.14 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 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-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block X-Robots-Tag: none X-Frame-Options: SAMEORIGIN X-Download-Options: noopen X-Permitted-Cross-Domain-Policies: none Content-Length: 312 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/xml; charset=utf-8

--f4979c52-E--

--f4979c52-H-- Apache-Error: [file "mod_apparmor.c"] [line 192] [level 4] [status 1] aa_change_hatv call failed Apache-Handler: application/x-httpd-php Stopwatch: 1458898867745467 134459 (- - -) Stopwatch2: 1458898867745467 134459; combined=1619, p1=170, p2=1229, p3=17, p4=79, p5=123, sr=42, sw=1, l=0, gc=0 Response-Body-Transformed: Dechunked Producer: ModSecurity for Apache/2.7.7 (http://www.modsecurity.org/); OWASP_CRS/2.2.9. Server: Apache WebApp-Info: "default" "-" "" Engine-Mode: "ENABLED"

--f4979c52-Z--

DeepDiver1975 commented 8 years ago

@meras1894 are you still facing this issue? I was not able to reproduce this. THX

meras1894 commented 8 years ago

I don't have that issue anymore. I made a complete fresh installation of Ubuntu and Owncloud... don't know, whats different.