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

Theming app (still) not working in NC 12.0.3 #6581

Closed
croessner opened this issue Sep 20, 2017 · 18 comments
Closed

Theming app (still) not working in NC 12.0.3 #6581

croessner opened this issue Sep 20, 2017 · 18 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: theming

Comments

@croessner
Copy link

Steps to reproduce

  1. Go to the theming settings
  2. Select a PNG logo

Expected behaviour

Logo should be uploaded and set

Actual behaviour

Dialog says that it stored the image and I see a broken link in the preview. Of logging out and back in there is still only the the default NC logo.

Server configuration

Operating system:
Gentoo Linux

Web server:
Installed versions: 1.13.5(mainline)^t(06:34:23 PM 09/19/2017)(aio http http-cache http2 ipv6 pcre ssl threads vim-syntax -debug -libatomic -libressl -luajit -pcre-jit -rtmp -selinux NGINX_MODULES_HTTP="access auth_basic autoindex browser cache_purge charset dav dav_ext empty_gif fancyindex fastcgi geo gzip gzip_static headers_more image_filter limit_conn limit_req map memcached mp4 proxy push_stream realip referer rewrite scgi spdy split_clients ssi upstream_ip_hash userid uwsgi xslt -addition -auth_ldap -auth_pam -auth_request -degradation -echo -flv -geoip -gunzip -lua -memc -metrics -mirror -mogilefs -naxsi -perl -random_index -secure_link -security -slice -slowfs_cache -sticky -stub_status -sub -upload_progress -upstream_check -upstream_hash -upstream_keepalive -upstream_least_conn -upstream_zone" NGINX_MODULES_MAIL="-imap -pop3 -smtp" NGINX_MODULES_STREAM="-access -geo -geoip -limit_conn -map -realip -return -split_clients -ssl_preread -upstream_hash -upstream_least_conn -upstream_zone" USERLAND="GNU")

Database:
Installed versions: 10.1.26{tbz2}(11:40:56 AM 09/11/2017)(backup bindist cracklib extraengine innodb-lz4 innodb-lzo innodb-snappy jemalloc openssl pam perl server -debug -embedded -galera -jdbc -kerberos -latin1 -libressl -mroonga -odbc -oqgraph -profiling -selinux -sphinx -sst-rsync -sst-xtrabackup -static -static-libs -systemd -systemtap -tcmalloc -test -tokudb -xml -yassl ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" ELIBC="-FreeBSD")

PHP version:
Installed versions: 7.0.23(7.0)(06:32:03 PM 09/19/2017)(acl bcmath berkdb bzip2 calendar cgi cli crypt ctype curl exif fileinfo filter flatfile fpm ftp gd gdbm gmp hash iconv imap inifile intl iodbc ipv6 json ldap ldap-sasl mhash mysql mysqli nls opcache pcntl pdo phar posix postgres readline session simplexml snmp soap sockets spell sqlite ssl sysvipc threads tidy tokenizer truetype unicode wddx xml xmlreader xmlrpc xmlwriter xpm xslt zip zlib -apache2 -cdb -cjk -coverage -debug -embed -enchant -firebird -kerberos -libedit -libressl -mssql -oci8-instant-client -odbc -phpdbg -qdbm -recode -selinux -sharedmem -systemd -webp)

Nextcloud version: (see Nextcloud admin page)
12.0.3

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

Where did you install Nextcloud from:
Official website

Signing status:
No errors have been found.

List of activated apps:

  • activity: 2.5.2
  • admin_audit: 1.2.0
  • admin_notifications: 1.0.0
  • announcementcenter: 3.1.0
  • apporder: 0.4.0
  • bookmarks: 0.10.1
  • bruteforcesettings: 1.0.2
  • checksum: 0.3.5
  • circles: 0.12.4
  • comments: 1.2.0
  • dashboard: 4.0.5
  • dav: 1.3.0
  • deck: 0.2.2
  • drawio: 0.8.8
  • encryption: 1.6.0
  • external: 2.0.3
  • federatedfilesharing: 1.2.0
  • federation: 1.2.0
  • files: 1.7.2
  • files_accesscontrol: 1.2.4
  • files_automatedtagging: 1.2.2
  • files_clipboard: 0.6.4
  • files_downloadactivity: 1.1.1
  • files_external: 1.3.0
  • files_pdfviewer: 1.1.1
  • files_reader: 1.0.4
  • files_retention: 1.1.2
  • files_sharing: 1.4.0
  • files_snapshots: 0.1.1
  • files_texteditor: 2.4.1
  • files_trashbin: 1.2.0
  • files_videoplayer: 1.1.0
  • firstrunwizard: 2.1
  • flowupload: 0.0.5
  • gallery: 17.0.0
  • groupfolders: 1.1.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.0.0
  • mail: 0.7.3
  • metadata: 0.5.0
  • music: 0.5.1
  • nextant: 1.0.8
  • nextcloud_announcements: 1.1
  • notes: 2.3.1
  • notifications: 2.0.0
  • oauth2: 1.0.5
  • ownbackup: 17.5.0
  • passman: 2.1.4
  • password_policy: 1.2.2
  • previewgenerator: 1.0.6
  • provisioning_api: 1.2.0
  • quota_warning: 1.1.0
  • radio: 0.6.0
  • ransomware_protection: 1.0.3
  • richdocuments: 1.12.34
  • serverinfo: 1.2.0
  • sharebymail: 1.2.0
  • socialsharing_diaspora: 1.0.1
  • socialsharing_email: 1.0.1
  • socialsharing_facebook: 1.0.1
  • socialsharing_googleplus: 1.0.1
  • socialsharing_twitter: 1.0.1
  • spreed: 2.0.1
  • spreedme: 0.3.11
  • survey_client: 1.0.0
  • systemtags: 1.2.0
  • tasks: 0.9.5
  • theming: 1.3.0
  • twofactor_backupcodes: 1.1.1
  • updatenotification: 1.2.0
  • user_external: 0.4
  • user_ldap: 1.2.1
  • weather: 1.5.0
  • workflowengine: 1.2.0

Nextcloud configuration:

{
    "system": {
        "instanceid": "oc6bv5n6btbh",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.roessner-net.de"
        ],
        "datadirectory": "\/mnt\/btrfs\/nextcloud",
        "asset-pipeline.enabled": true,
        "overwriteprotocol": "https",
        "overwrite.cli.url": "https:\/\/cloud.roessner-net.de",
        "dbtype": "mysql",
        "version": "12.0.3.3",
        "logtimezone": "Europe\/Berlin",
        "installed": true,
        "maintenance": false,
        "dbname": "nextcloud",
        "dbhost": "localhost",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "filesystem_check_changes": 1,
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379,
            "timeout": 2
        },
        "knowledgebaseenabled": true,
        "enable_avatars": false,
        "allow_user_to_change_display_name": false,
        "auth.bruteforce.prevention.enabled": true,
        "updatechecker": true,
        "log_type": "owncloud",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 0,
        "logdateformat": "F d, Y H:i:s",
        "cron_log": true,
        "log_rotate_size": false,
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "mail.roessner-net.de",
        "mail_smtpport": "587",
        "mail_from_address": "nextcloud",
        "mail_domain": "roessner-net.de",
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\Movie"
        ],
        "mail_smtpsecure": "tls",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "singleuser": false,
        "mysql.utf8mb4": true,
        "updater.release.channel": "stable",
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "theme": ""
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
Dropbox and another NC12 instance

Are you using encryption: yes/no
Module loaded, but not used.

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

LDAP configuration (delete this part if not used)

+-------------------------------+--------------------------------------------------------------------------------------------------------+
| Configuration                 |                                                                                                        |
+-------------------------------+--------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                      |
| hasPagedResultSupport         |                                                                                                        |
| homeFolderNamingRule          |                                                                                                        |
| lastJpegPhotoLookup           | 0                                                                                                      |
| ldapAgentName                 | cn=webserver,ou=people,ou=it,dc=roessner-net,dc=de                                                     |
| ldapAgentPassword             | ***                                                                                                    |
| ldapAttributesForGroupSearch  |                                                                                                        |
| ldapAttributesForUserSearch   |                                                                                                        |
| ldapBackupHost                |                                                                                                        |
| ldapBackupPort                |                                                                                                        |
| ldapBase                      | ou=people,ou=it,dc=roessner-net,dc=de                                                                  |
| ldapBaseGroups                | ou=people,ou=it,dc=roessner-net,dc=de                                                                  |
| ldapBaseUsers                 | ou=people,ou=it,dc=roessner-net,dc=de                                                                  |
| ldapCacheTTL                  | 3600                                                                                                   |
| ldapConfigurationActive       | 1                                                                                                      |
| ldapDefaultPPolicyDN          |                                                                                                        |
| ldapDynamicGroupMemberURL     |                                                                                                        |
| ldapEmailAttribute            | mail                                                                                                   |
| ldapExperiencedAdmin          | 0                                                                                                      |
| ldapExpertUUIDGroupAttr       | cn                                                                                                     |
| ldapExpertUUIDUserAttr        | uniqueIdentifier                                                                                       |
| ldapExpertUsernameAttr        | uniqueIdentifier                                                                                       |
| ldapGidNumber                 | gidNumber                                                                                              |
| ldapGroupDisplayName          | cn                                                                                                     |
| ldapGroupFilter               | (&(|(objectclass=groupOfNames))(|(cn=NextCloudGroup)))                                                 |
| ldapGroupFilterGroups         | NextCloudGroup                                                                                         |
| ldapGroupFilterMode           | 0                                                                                                      |
| ldapGroupFilterObjectclass    | groupOfNames                                                                                           |
| ldapGroupMemberAssocAttr      | member                                                                                                 |
| ldapHost                      | localhost                                                                                              |
| ldapIgnoreNamingRules         |                                                                                                        |
| ldapLoginFilter               | (|(uniqueIdentifier=%uid)(rnsMSRecipientAddress=%uid))                                                 |
| ldapLoginFilterAttributes     |                                                                                                        |
| ldapLoginFilterEmail          | 1                                                                                                      |
| ldapLoginFilterMode           | 1                                                                                                      |
| ldapLoginFilterUsername       | 1                                                                                                      |
| ldapNestedGroups              | 0                                                                                                      |
| ldapOverrideMainServer        |                                                                                                        |
| ldapPagingSize                | 500                                                                                                    |
| ldapPort                      | 389                                                                                                    |
| ldapQuotaAttribute            |                                                                                                        |
| ldapQuotaDefault              |                                                                                                        |
| ldapTLS                       | 0                                                                                                      |
| ldapUserDisplayName           | cn                                                                                                     |
| ldapUserDisplayName2          |                                                                                                        |
| ldapUserFilter                | (&(|(objectclass=inetOrgPerson))(|(memberof=cn=NextCloudGroup,ou=people,ou=it,dc=roessner-net,dc=de))) |
| ldapUserFilterGroups          | NextCloudGroup                                                                                         |
| ldapUserFilterMode            | 1                                                                                                      |
| ldapUserFilterObjectclass     | inetOrgPerson                                                                                          |
| ldapUuidGroupAttribute        | auto                                                                                                   |
| ldapUuidUserAttribute         | auto                                                                                                   |
| turnOffCertCheck              | 1                                                                                                      |
| turnOnPasswordChange          | 0                                                                                                      |
| useMemberOfToDetectMembership | 1                                                                                                      |
+-------------------------------+--------------------------------------------------------------------------------------------------------+

Client configuration

Browser:
Safari-11.0

Operating system:
macOS Sierra

Logs

Web server error log

2017/09/20 09:11:47 [warn] 13161#13161: *2 a client request body is buffered to a temporary file /var/lib/nginx/tmp/client/0000000001, client: 193.239.106.201, server: cloud.roessner-net.de, request: "POST /apps/theming/ajax/updateLogo HTTP/2.0", host: "cloud.roessner-net.de"

Nextcloud log (data/nextcloud.log)

{"reqId":"8L5CrM2YX8dw5cDw7463","level":3,"time":"September 20, 2017 09:11:58","remoteAddr":"193.239.106.201","user":"croessn
er","app":"PHP","method":"POST","url":"\/apps\/theming\/ajax\/updateLogo","message":"file_get_contents(): Filename cannot be
empty at \/var\/www\/localhost\/htdocs\/nextcloud\/apps\/theming\/lib\/Controller\/ThemingController.php#230","userAgent":"Mo
zilla\/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit\/604.1.38 (KHTML, like Gecko) Version\/11.0 Safari\/604.1.38","ver
sion":"12.0.3.3"}

Browser log

bildschirmfoto 2017-09-20 um 10 28 53

@MorrisJobke
Copy link
Member

cc @nextcloud/theming

@MorrisJobke MorrisJobke added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: theming labels Sep 20, 2017
@danxuliu
Copy link
Member

Follow-up issue to #6267.

@juliushaertl
Copy link
Member

juliushaertl commented Sep 20, 2017

Can you check your php settings, if that file may not be uploaded because of size limitations in upload_max_filesize.

file_get_contents(): Filename cannot be empty at /var/www/localhost/htdocs/nextcloud/apps/theming/lib/Controller/ThemingController.php#230

It seems we don't catch errors within the $_FILES variable when uploading a logo, let me check out if we can at least provide proper error messages if something goes wrong there.

@croessner
Copy link
Author

This is my php.ini, which I merged with the one found for the docker image.

cat php.ini | grep -vE "^.(;|#)." | grep -vE "^$"

[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 17
disable_functions =
disable_classes =
zend.enable_gc = On
expose_php = On
max_execution_time = 600
max_input_time = 600
memory_limit = 128M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = On
error_log = php_errors.log
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 10G
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
always_populate_raw_post_data = -1
include_path = ".:/usr/share/php7:/usr/share/php"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On


upload_max_filesize = 10G


max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
[CLI Server]
cli_server.color = On
[Date]
date.timezone = Europe/Berlin
[filter]
[iconv]
[intl]
[sqlite3]
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket = /var/run/mysqld/mysqld.sock
[Phar]
[mail function]
SMTP = localhost
smtp_port = 25
mail.add_x_header = On
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[MySQL]
mysql.allow_local_infile = On
mysql.allow_persistent = On
mysql.cache_size = 2000
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket = /var/run/mysqld/mysqld.sock
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket = /var/run/mysqld/mysqld.sock
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off
[OCI8]
[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[Assertion]
zend.assertions = -1
[COM]
[mbstring]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
[sysvshm]
[ldap]
ldap.max_links = -1
[mcrypt]
[dba]
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.revalidate_freq=1
[curl]
[openssl]
apc.enabled=1
apc.shm_size=32M
apc.ttl=7200
apc.enable_cli=1

@croessner
Copy link
Author

Here is my "merged" nginx config:

map $http_upgrade $connection_upgrade {
	default	upgrade;
	''		close;
}

fastcgi_cache_path /var/cache/nginx/nextcloud levels=1:2 keys_zone=nextcloud:100m inactive=60m;

map $request_uri $skip_cache {
     default 1;
     ~*/thumbnail.php 0;
     ~*/apps/galleryplus/ 0;
     ~*/apps/gallery/ 0;
}

if_modified_since before;

# output compression saves bandwidth
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_proxied any;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
gzip_min_length 256;

# make sure gzip does not lose large gzipped js or css files
# see http://blog.leetsoft.com/2007/07/25/nginx-gzip-ssl.html
gzip_buffers 16 8k;

server {
    listen 134.255.226.244:443 ssl http2;
    listen [2a05:bec0:28:1:134:255:226:244]:443 ssl http2;

    server_name cloud.roessner-net.de;

    root /var/www/localhost/htdocs/nextcloud;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/cloud.roessner-net.de/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/cloud.roessner-net.de/privkey.pem;
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;

    ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
    ssl_prefer_server_ciphers on;
    ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
    ssl_dhparam /etc/ssl/private/dhparams.pem;

    # OCSP Stapling ---
    # fetch OCSP records from URL in ssl_certificate and cache them
    ssl_stapling on;
    ssl_stapling_verify on;

    #ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
    resolver 134.255.226.242;

    add_header Strict-Transport-Security "max-age=15768000; includeSubDomains";
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;
    add_header Referrer-Policy "same-origin";

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    # The following 2 rules are only needed for the user_webfinger app.
    # Uncomment it if you're planning to use this app.
    #rewrite ^/.well-known/host-meta /nextcloud/public.php?service=host-meta last;
    #rewrite ^/.well-known/host-meta.json /nextcloud/public.php?service=host-meta-json last;

    location = /.well-known/carddav {
        return 301 $scheme://$host/nextcloud/remote.php/dav;
    }
    location = /.well-known/caldav {
        return 301 $scheme://$host/nextcloud/remote.php/dav;
    }

    client_body_buffer_size 512M;
    client_max_body_size 10250M;

    # Uncomment if your server is build with the ngx_pagespeed module
    # This module is currently not supported.
    #pagespeed off;

    location / {
        rewrite ^ /index.php$uri;
    }

    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
        deny all;
    }
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
        deny all;
    }

    error_page 403 /core/templates/403.php;
    error_page 404 /core/templates/404.php;

    # Spreed WebRTC
    location ^~ /webrtc {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_buffering             on;
        proxy_ignore_client_abort   off;
        proxy_redirect              off;
        proxy_connect_timeout       90;
        proxy_send_timeout          90;
        proxy_read_timeout          90;
        proxy_buffer_size           4k;
        proxy_buffers               4 32k;
        proxy_busy_buffers_size     64k;
        proxy_temp_file_write_size  64k;
        proxy_next_upstream         error timeout invalid_header http_502 http_503 http_504;
    }

    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param HTTPS on;

        #Avoid sending the security headers twice
        fastcgi_param modHeadersAvailable true;
        fastcgi_param front_controller_active true;
        fastcgi_pass unix:/var/run/php5-fpm-system.sock;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering on;

        fastcgi_buffers 64 64K;
        fastcgi_buffer_size 256k;
        fastcgi_cache_key $http_cookie$request_method$host$request_uri;
        fastcgi_cache_use_stale error timeout invalid_header http_500;
        fastcgi_ignore_headers Cache-Control Expires Set-Cookie;

        fastcgi_cache_bypass $skip_cache;
        fastcgi_no_cache $skip_cache;
        fastcgi_cache nextcloud;
    }

    location ~ ^/(?:updater|ocs-provider)(?:$|/) {
        try_files $uri/ =404;
        index index.php;
    }

    # Adding the cache control header for js and css files
    # Make sure it is BELOW the PHP block
    location ~ \.(?:css|js|woff|svg|gif)$ {
        try_files $uri /index.php$uri$is_args$args;
        add_header Cache-Control "public, max-age=15778463";
        add_header Strict-Transport-Security "max-age=15768000; includeSubDomains";
        add_header X-Content-Type-Options nosniff;
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Robots-Tag none;
        add_header X-Download-Options noopen;
        add_header X-Permitted-Cross-Domain-Policies none;
        add_header Referrer-Policy "same-origin";
        # Optional: Don't log access to assets
        access_log off;
    }

    location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
        try_files $uri /index.php$uri$is_args$args;
        # Optional: Don't log access to other assets
        access_log off;
    }

    access_log /var/log/nginx/access_ssl-nextcloud.log main;
    error_log /var/log/nginx/error_ssl-nextcloud.log info;
}

@croessner
Copy link
Author

BTW: Everything else in NC with all these apps is working perfectly. Photos, Videos, Documents, WebRTC-stuff. Really everything else works.

@juliushaertl
Copy link
Member

@croessner Thanks for the detailed information. Although I cannot find any issue in that right now.
Can you maybe apply the changes from https://github.com/nextcloud/server/pull/6585/files#diff-bcf7a23d2d7c91f3102f9c15c4094452 to your instance and check if a proper error message occurs if you upload an image?

@croessner
Copy link
Author

@juliushaertl I will give it a try in the next hour and report back...

@croessner
Copy link
Author

@juliushaertl 👍 You rock!! Your patches finally fixed my problems! Even though I had to create the dirs tests/Controller first. But it works. So happy. Thanks a lot

@juliushaertl
Copy link
Member

@croessner Glad i could help. Tests are not included in the release packages, as they are not required there. Just out of interest, was there an issue with the file you uploaded?

@croessner
Copy link
Author

croessner commented Sep 21, 2017

@juliushaertl there seems to be one bug remaining :-(

If I have set the background login image for the first time with your patched version, I can neither reset, restore nor set a new image. It always says that it saved it successfully. Nothing is logged in nextcloud.log nor in the JavaScrip console. It simply does not do the job.

It keeps the current image

@SkyWheel
Copy link

I have the same issue in my Nextcloud-snap 12/Edge installation. Obviously I can't change anything in the snap.
So, the question is how to fix that in the snap?

@croessner
Copy link
Author

Seems to be some browser caching issue. Is it possible to set some headers for the theming app that prevents caching?

@juliushaertl
Copy link
Member

@croessner I cannot reproduce the issue. Restoring/setting a new image works fine on my setup.

@juliushaertl
Copy link
Member

Btw. we have a cachebuster on every resource, so after changing a value in the theming app all files that depend on the theming should be loaded again.

@SkyWheel
Copy link

@croessner , it doesn't related to any browser at all. The issue been reproduced with all browsers in different systems. I have a lot of browsers that work in private mode with deleting all cache/history/cookies, the issue is there as well.

@call-me-matt
Copy link
Member

Same problem. Color changes in the iPad app, not in the browser.

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@MorrisJobke
Copy link
Member

We improved the caching logic of the theming app recently to better invalidate existing themes. Could you try again with 13.0.4?

This should be solved in there. I will close this ticket for now. If this happens again, please ping here and we can then reopen the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: theming
Projects
None yet
Development

No branches or pull requests

7 participants