rainloop-webmail icon indicating copy to clipboard operation
rainloop-webmail copied to clipboard

SecruityProblem with Owncloud 8 and Rainloop

Open 8l4ckSh33p opened this issue 11 years ago • 10 comments

Example: User "Max" calls his mail through rainloop in the cloud from, looks at her, and then logs off. At the same pc now logs on "Peter". But who has not entered any mail.

If he clicks on email, he can read the mail from Max. So he is then signed with his Rainloop account. Fatal !!!

8l4ckSh33p avatar Feb 15 '15 22:02 8l4ckSh33p

Confirmed on Windows 7 with newst Firefox an Windows Phone 8.1

8l4ckSh33p avatar Feb 15 '15 23:02 8l4ckSh33p

I can't reproduce it.

  1. login as user1
  2. RainLoop shows user1 mails
  3. logout
  4. login as user2
  5. RainLoop shows user2 mails

But who has not entered any mail. If he clicks on email,

What it means?

RainLoop avatar Feb 15 '15 23:02 RainLoop

Sorry, my english is bad 😆

User2 has no email address in his personal space. He can but read the mail from user1 when he clicks the rainloop app!

8l4ckSh33p avatar Feb 15 '15 23:02 8l4ckSh33p

Hmmm, I think I can reproduce.

  1. Login ownCloud as User1 (has email account)
  2. Click on Email (rainloop app), auto login works.
  3. NOT log out of RainLoop, but only out of ownCloud (browser session for rainloop is saved)
  4. Login ownCloud as User2
  5. Click in Email (rainloop app) and the mail from User1 appears!

Here it doesn't matter if User2 has an email account or not, he still gets the saved browser session for Rainloop. Not so much dangerous on my own computer, but more on shared computers.

jelle-e avatar Feb 15 '15 23:02 jelle-e

Yes jelle-e 😊

8l4ckSh33p avatar Feb 15 '15 23:02 8l4ckSh33p

Have you enabled "Automatically login with ownCloud user credentials" option?

RainLoop avatar Feb 15 '15 23:02 RainLoop

No

8l4ckSh33p avatar Feb 15 '15 23:02 8l4ckSh33p

I have enabled 'Autologin' in ownCloud admin settings. Tested on Firefox and Chrome.

jelle-e avatar Feb 15 '15 23:02 jelle-e

It looks like that the ownCloud logout hook does not want to work.

OCP\Util::connectHook('OC_User', 'logout', 'OC_RainLoop_Helper', 'logout');

Try to ...

./apps/rainloop/app/rainloop/v/1.8.1.255/app/libraries/RainLoop/ServiceActions.php (~227)

... fix ServiceOwnCloudAuth function

    /**
     * @return string
     */
    public function ServiceOwnCloudAuth()
    {
        if (!\RainLoop\Utils::IsOwnCloud() ||
            !isset($_ENV['___rainloop_owncloud_email']) ||
            !isset($_ENV['___rainloop_owncloud_password']) ||
            empty($_ENV['___rainloop_owncloud_email'])
        )
        {
            $this->oActions->SetAuthLogoutToken();
            $this->oActions->Location('./');
            return '';
        }

        $bLogout = true;

        $sEmail = $_ENV['___rainloop_owncloud_email'];
        $sPassword = $_ENV['___rainloop_owncloud_password'];

        try
        {
            $oAccount = $this->oActions->LoginProcess($sEmail, $sPassword);
            $this->oActions->AuthToken($oAccount);

            $bLogout = !($oAccount instanceof \RainLoop\Model\Account);
        }
        catch (\Exception $oException)
        {
            $this->oActions->Logger()->WriteException($oException);
        }

        if ($bLogout)
        {
            $this->oActions->SetAuthLogoutToken();
        }

        $this->oActions->Location('./');
        return '';
    }

RainLoop avatar Feb 16 '15 00:02 RainLoop

I have tried it. Runs great!

8l4ckSh33p avatar Feb 16 '15 09:02 8l4ckSh33p