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 background image fails for other trusted domains #5085

Closed
cygnix opened this issue May 24, 2017 · 7 comments
Closed

Theming background image fails for other trusted domains #5085

cygnix opened this issue May 24, 2017 · 7 comments

Comments

@cygnix
Copy link

cygnix commented May 24, 2017

After upgrading from 11.03 to 12.0.0.29, background image set by the admin, is activated only for the trusted domain from which it was set, and resets the background image for all other trusted domains to the color selected.

For example, if a setup has domain.com and cloud.domain.com as trusted domains, and one logs in from domain.com, sets or resets the background image, accessing the server via cloud.domain.com, you will not see a background image, rather, it uses the set color as background.

@enoch85
Copy link
Member

enoch85 commented May 24, 2017

I can confirm this. @cygnix Please fill out the template that you were presented with when you opened this ticket. Thanks!

@enoch85 enoch85 added the bug label May 24, 2017
@BornToBeRoot
Copy link

@enoch85 I have the same issue. It's only the background image and logo which are not shown. The color and slogan are working.

Nextcloud 12.0 (fresh/no upgrade) on CentOS 7 with apache/mariadb/php 7.1.

Additional software: php-fpm, imagick, redis, apcu

There is nothing in the logfiles (debug)

@cygnix
Copy link
Author

cygnix commented May 26, 2017

Server configuration

Operating system: Debian 8.8

Web server: Apache

Database: PostgreSQL 9.4.12

PHP version: 5.6.30-0+deb8u1
Modules loaded: Core, date, ereg, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dba, dom, hash, fileinfo, filter, ftp, gettext, SPL, iconv, mbstring, session, posix, Reflection, standard, shmop, SimpleXML, soap, sockets, Phar, exif, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, apache2handler, PDO, apcu, curl, gd, imagick, imap, json, ldap, mcrypt, pdo_pgsql, pgsql, readline, mhash, apc, Zend OPcache

Nextcloud version: 12.0.0 - 12.0.0.29

Updated from an older Nextcloud/ownCloud or fresh install:
NC 11.03 -> NC 12.0

Where did you install Nextcloud from: download.nextcloud.com

Signing status:

Signing status
No issue reported

List of activated apps:

App list ``` Enabled: - activity: 2.5.2 - admin_audit: 1.2.0 - bruteforcesettings: 1.0.2 - calendar: 1.5.3 - comments: 1.2.0 - contacts: 1.5.3 - dav: 1.3.0 - federatedfilesharing: 1.2.0 - federation: 1.2.0 - files: 1.7.2 - files_accesscontrol: 1.2.4 - files_antivirus: 1.0.0.0 - files_pdfviewer: 1.1.1 - files_sharing: 1.4.0 - files_texteditor: 2.4.1 - files_trashbin: 1.2.0 - files_versions: 1.5.0 - files_videoplayer: 1.1.0 - firstrunwizard: 2.1 - gallery: 17.0.0 - groupfolders: 1.0.2 - issuetemplate: 0.2.1 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - nextcloud_announcements: 1.1 - notes: 2.2.0 - notifications: 2.0.0 - oauth2: 1.0.5 - password_policy: 1.2.2 - provisioning_api: 1.2.0 - serverinfo: 1.2.0 - sharebymail: 1.2.0 - spreed: 2.0.1 - 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 - workflowengine: 1.2.0

Disabled:

  • encryption
  • files_external
  • ojsxc
  • user_ldap
</details>

**The content of config/config.php:**
<details>
	<summary>Config report</summary>

{
"instanceid": "removed",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"domain.com",
"cloud.domain.com",
"www.domain.com",
"nextcloud.domain.com"
],
"datadirectory": "/var/www/ncdata",
"overwrite.cli.url": "https://cloud.domain.com",
"dbtype": "pgsql",
"version": "12.0.0.29",
"dbname": "nextcloud",
"dbhost": "localhost",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"logtimezone": "UTC",
"installed": true,
"mail_smtpmode": "smtp",
"mail_smtpauth": 1,
"mail_domain": "domain.com",
"mail_smtpport": "587",
"mail_from_address": "noreply",
"mail_smtpauthtype": "PLAIN",
"mail_smtpsecure": "tls",
"mail_smtphost": "smtp.domain.com",
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"user_backends": [
{
"class": "OC_User_IMAP",
"arguments": [
"{imap.domain.com:993/imap/ssl}"
]
}
],
"htaccess.RewriteBase": "/",
"memcache.local": "\OC\Memcache\APCu",
"updater.release.channel": "stable",
"maintenance": false,
"theme": "",
"loglevel": 2
}

</details>

**Are you using external storage, if yes which one:** files_external is disabled

**Are you using encryption:** no

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

### Client configuration
**Browser:** Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

**Operating system:**

### Logs
#### Nextcloud log (data/nextcloud.log)
<details>
	<summary>Nextcloud log</summary>
	```
	{"reqId":"c1rwbGWGzHD03EkXMkyW","level":3,"time":"2017-05-26T03:31:45+00:00","remoteAddr":"<***removed***>","user":"--","app":"no app in context","method":"GET","url":"\/\/a2billing\/customer\/form_data\/FG_var_callerid.inc","message":"Exception: {\"Exception\":\"Symfony\\\\Component\\\\Routing\\\\Exception\\\\RouteNotFoundException\",\"Message\":\"Unable to generate a URL for the named route \\\"theming.Theming.getLoginBackground\\\" as such route does not exist.\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Route\\\/Router.php(339): Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator->generate('theming.Theming...', Array, 1)\\n#1 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Route\\\/CachingRouter.php(60): OC\\\\Route\\\\Router->generate('theming.Theming...', Array, false)\\n#2 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/URLGenerator.php(70): OC\\\\Route\\\\CachingRouter->generate('theming.Theming...', Array)\\n#3 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/theming\\\/lib\\\/ThemingDefaults.php(180): OC\\\\URLGenerator->linkToRoute('theming.Theming...')\\n#4 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/theming\\\/lib\\\/ThemingDefaults.php(200): OCA\\\\Theming\\\\ThemingDefaults->getBackground()\\n#5 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/SCSSCacher.php(263): OCA\\\\Theming\\\\ThemingDefaults->getScssVariables()\\n#6 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/SCSSCacher.php(162): OC\\\\Template\\\\SCSSCacher->getInjectedVariables()\\n#7 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/SCSSCacher.php(109): OC\\\\Template\\\\SCSSCacher->variablesChanged()\\n#8 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/CSSResourceLocator.php(99): OC\\\\Template\\\\SCSSCacher->process('\\\/var\\\/www\\\/nextcl...', 'core\\\/css\\\/server...', 'core')\\n#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/CSSResourceLocator.php(56): OC\\\\Template\\\\CSSResourceLocator->cacheAndAppendScssIfExist('\\\/var\\\/www\\\/nextcl...', 'core\\\/css\\\/server...')\\n#10 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/ResourceLocator.php(75): OC\\\\Template\\\\CSSResourceLocator->doFind('css\\\/server')\\n#11 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/TemplateLayout.php(225): OC\\\\Template\\\\ResourceLocator->find(Array)\\n#12 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/TemplateLayout.php(170): OC\\\\TemplateLayout::findStylesheetFiles(Array)\\n#13 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/template.php(205): OC\\\\TemplateLayout->__construct('guest', 'core')\\n#14 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/Base.php(132): OC_Template->fetchPage()\\n#15 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(809): OC\\\\Template\\\\Base->printPage()\\n#16 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(1082): OC::init()\\n#17 \\\/var\\\/www\\\/nextcloud\\\/index.php(38): require_once('\\\/var\\\/www\\\/nextcl...')\\n#18 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/symfony\\\/routing\\\/Generator\\\/UrlGenerator.php\",\"Line\":130}","userAgent":"curl\/7.29.0","version":"12.0.0.29"}
{"reqId":"QgBNTao1pH6eaLJryjH8","level":3,"time":"2017-05-26T04:31:23+00:00","remoteAddr":"<***removed***>","user":"nextcloud","app":"PHP","method":"GET","url":"\/settings\/admin\/issuetemplate","message":"Illegal offset type at \/var\/www\/nextcloud\/apps\/issuetemplate\/lib\/Settings\/Admin.php#219","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/58.0.3029.110 Safari\/537.36","version":"12.0.0.29"}
	```
</details>

@Midek
Copy link

Midek commented Jun 4, 2017

I can confirm same behavior in my Nextcloud 12, except i noticed that background and logo are logo are actually displayed on the page. Just that they are below a layer of color that is being set by theming app.
Ex: when i right click on the place where logo should be i can select 'open image in new tab' and it shows up properly.

@derpicknicker1
Copy link

Same problem here!
My Chrome console output says:
Refused to load the image 'https://cloud.MYDOMAIN.tld/core/img/logo.svg?v=6' because it violates the following Content Security Policy directive: "img-src 'self' data: blob:".

@juliusknorr
Copy link
Member

A patch is at #5429 Please help testing 😉

@MorrisJobke MorrisJobke added this to the Nextcloud 13 milestone Jun 19, 2017
@MorrisJobke
Copy link
Member

Fixed via #5429

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

7 participants