hypery2k / owncloud

In this repo you'll find apps and enhancements for owncloud
Other
156 stars 85 forks source link

Unable to store email credentials in the data-base if RC host are external #375

Closed REVMedia closed 7 years ago

REVMedia commented 7 years ago

Hello,

I have this error on my owncloud installation.

How do i fix this error? It like that al settings are correct...

mckaygerhard commented 7 years ago

please paste the log in debug mode of your owncloud when this happened only enabled the minimiun required apps

also, u must follow the installation instructions, and provide more details, I'm not a guesser so provide minimun environment details, such as owncloud version and installation, roundcube version and installation, also advertise that client also must be a linux

mikygee commented 7 years ago

Hello,

I have the same problem.

I have created another "issue" for code improvement #376

When I press Update mail Identity I have the following logs

{"reqId":"gObvzwMCMHYoqR1ICO8s","remoteAddr":"10.5.8.2","app":"roundcube","message":"OC_RoundCube_App.class.php->checkLoginData(): Checking login data for oc user myuser","level":0,"time":"2017-02-02T20:48:00+01:00","method":"POST","url":"\/index.php\/apps\/roundcube\/ajax\/userSettings.php"} {"reqId":"gObvzwMCMHYoqR1ICO8s","remoteAddr":"10.5.8.2","app":"roundcube","message":"OC_RoundCube_App.class.php->checkLoginData(): Found login data for oc user myuser","level":0,"time":"2017-02-02T20:48:00+01:00","method":"POST","url":"\/index.php\/apps\/roundcube\/ajax\/userSettings.php"} {"reqId":"gObvzwMCMHYoqR1ICO8s","remoteAddr":"10.5.8.2","app":"roundcube","message":"OC_RoundCube_App.class.php->cryptEmailIdentity(): Found valid mail login data for user myuser (mail user: myuser@mydomain.org)","level":1,"time":"2017-02-02T20:48:00+01:00","method":"POST","url":"\/index.php\/apps\/roundcube\/ajax\/userSettings.php"} {"reqId":"gObvzwMCMHYoqR1ICO8s","remoteAddr":"10.5.8.2","app":"roundcube","message":"OC_RoundCube_App.class.php->cryptMyEntry(): Starting encryption.","level":0,"time":"2017-02-02T20:48:00+01:00","method":"POST","url":"\/index.php\/apps\/roundcube\/ajax\/userSettings.php"} {"reqId":"gObvzwMCMHYoqR1ICO8s","remoteAddr":"10.5.8.2","app":"PHP","message":"openssl_public_encrypt(): key parameter is not a valid public key at \/owncloud\/apps\/roundcube\/lib\/RoundCubeApp.class.php#190","level":3,"time":"2017-02-02T20:48:00+01:00","method":"POST","url":"\/index.php\/apps\/roundcube\/ajax\/userSettings.php"}

So the problem seems to be here public static function cryptMyEntry($entry, $pubKey) { OCP\Util::writeLog('roundcube', 'OC_RoundCube_App.class.php->cryptMyEntry(): Starting encryption.'."$pubKey", OCP\Util::DEBUG); if (openssl_public_encrypt($entry, $encryptedData, $pubKey) === false) { The $pubKey is empty

Why ? I don't know

mckaygerhard commented 7 years ago

i search into php docu, as u point in the other issue u sugessted that initialize the create key.. due the error its produced due the openssl_public_encrypt method returns empty response, i search into http://php.net/manual/en/function.openssl-pkey-new.php and seem the problem are not still related to unconfigured settings, do u have RC and OC in same host or different host/paths? different domains?

mikygee commented 7 years ago

Hi,

Yes RC and OC are on different hosts and I read the page (maybe I did something wrong but I think the problem is somewhere else)

I'm trying to continue to debug, and it seems the keys are generated when the user logs in.

What you have to know, is that I use nginx and it's chrooted, so I don't know but if php tries to reach openssl.conf out of the jail it might not work. I don't know...

mckaygerhard commented 7 years ago

okey so due both are in different host i marked u other issue as improvedment, and not as a bug

about the environment, well try to configure a reverse proxy as wiki said.. and report feedback, until december 2016 i use reverse proxy (lighty) and After some time it stopped working.. please move to the other issue, due the user here does not provide info about their environment

mckaygerhard commented 7 years ago

duplicate of #376

mckaygerhard commented 7 years ago

closed due author does not made any reply and not provide info about env, so lest move to #376 with code improvement as feature request