core icon indicating copy to clipboard operation
core copied to clipboard

Malformed activity mail

Open ralin3 opened this issue 12 years ago • 7 comments

Steps to reproduce

  1. Setup activity-mail.
  2. Force SSL-login.
  3. "do stuff"
  4. Look at mail and see wrong/unwanted info.

Expected behaviour

"Hello [user],

You are receiving this email because in the last hour the following things happened at https://[SITEURL]/owncloud/

  • You created[...]"

Actual behaviour

"Hello [user],

You are receiving this email because in the last hour the following things happened at http://[SITEURL]/var/www/owncloud/

  • You created[...]"

Notice how the server gives the url in http, even though I have forced HTTPS. Also it gives me the full local path on disk, not the external URL I use.

Server configuration

Operating system: Linux Server 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux

Web server: Server version: Apache/2.2.22 (Debian)

Database: mysqld Ver 5.5.38-0+wheezy1 for debian-linux-gnu on x86_64 ((Debian))

PHP version:

ownCloud version: (see ownCloud admin page) Owncloud 7.0.1, from your debian repo.

Updated from an older ownCloud or fresh install: Updated from 7.x

List of activated apps: Activity, Calendar, Contacts, Deleted files, Documents, dependency info, Pictures, Share Files, Tasks, Text Editor, Updater, Versions, Mozilla Sync, News. (I had ocDashboard but I removed it.)

The content of config/config.php:

'XXXX', 'passwordsalt' => 'XXXX', 'trusted_domains' => array ( 0 => '[SERVERURL]', ), 'datadirectory' => '/mnt/owncloud/', 'dbtype' => 'mysql', 'version' => '7.0.1.1', 'dbname' => 'XXXXX', 'dbhost' => '127.0.0.1', 'dbtableprefix' => 'oc_', 'dbuser' => 'XXXXX', 'dbpassword' => 'XXXXX', 'installed' => true, 'theme' => '', 'maintenance' => false, 'forcessl' => true, 'mail_smtpmode' => 'sendmail', 'logtimezone' => 'XXXXX', 'logfile' => '/var/log/owncloud.log', 'loglevel' => '2', 'log_authfailip' => true, ); **Are you using external storage, if yes which one:** local/smb/sftp/... no **Are you using encryption:** no ### Client configuration **Browser:** N/A **Operating system:** N/A ### Logs #### Web server error log N/A #### ownCloud log (data/owncloud.log) N/A #### Browser log N/A Please don't shoot me, my first bug report ever!

ralin3 avatar Aug 18 '14 22:08 ralin3

@nickvergessen Can you have a look?

karlitschek avatar Aug 19 '14 01:08 karlitschek

Please set the overwritewebroot option in your config.php: https://github.com/owncloud/core/blob/master/config/config.sample.php#L50-L51

We are adding a note about this in 7.0.2 While using system cron and not having owncloud installed in the root, you need to set this option.

@karlitschek could/should we set this automatically while installing oC?

nickvergessen avatar Aug 19 '14 08:08 nickvergessen

Added it to config.php now, with value '/owncloud'. Created a file, will report back with results.

Guessing this won't fix http vs https though? I'll report back anyway.

ralin3 avatar Aug 19 '14 08:08 ralin3

For https vs http try overwriteprotocol or forcessl: https://github.com/owncloud/core/blob/master/config/config.sample.php#L47-L48 https://github.com/owncloud/core/blob/master/config/config.sample.php#L38-L39

nickvergessen avatar Aug 19 '14 08:08 nickvergessen

Forcessl was already set via web, and made no difference. I've set overwriteprotocol too, so guess my issue will be fixed.

I get a feeling that this should be warned about or something though, I had no idea these values needed to be set (or even exist) when using system-cron, and overwriteprotocol seems a little bit unnecessary when forcessl is already set.

ralin3 avatar Aug 19 '14 08:08 ralin3

I get a feeling that this should be warned about or something though, I had no idea these values needed to be set (or even exist) when using system-cron, and overwriteprotocol seems a little bit unnecessary when forcessl is already set.

We added a warning yesterday for the webroot thing. It will be included in oC 7.0.2 https://github.com/owncloud/core/pull/10478

nickvergessen avatar Aug 19 '14 09:08 nickvergessen

Using overwriteprotocol and overwritewebroot fixed the email, closing the "issue".

ralin3 avatar Aug 19 '14 10:08 ralin3