]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge pull request #3893 from owncloud/backport_1872
authorBart Visscher <bartv@thisnet.nl>
Mon, 8 Jul 2013 18:28:33 +0000 (11:28 -0700)
committerBart Visscher <bartv@thisnet.nl>
Mon, 8 Jul 2013 18:28:33 +0000 (11:28 -0700)
Backport #1872

1  2 
lib/request.php

diff --cc lib/request.php
index 24a118b8b40943adcb57d787a3e37b26f4fac147,4d8380eb9ac49b85d1676fd057d18613d374e816..df33217f95d65bde3bcddc1af2e0e37ea5e78816
@@@ -9,11 -9,12 +9,12 @@@
  class OC_Request {
        /**
         * @brief Check overwrite condition
 -       * @returns true/false
 +       * @returns bool
         */
-       private static function isOverwriteCondition() {
+       private static function isOverwriteCondition($type = '') {
                $regex = '/' . OC_Config::getValue('overwritecondaddr', '')  . '/';
-               return $regex === '//' or preg_match($regex, $_SERVER['REMOTE_ADDR']) === 1;
+               return $regex === '//' or preg_match($regex, $_SERVER['REMOTE_ADDR']) === 1
+                       or ($type !== 'protocol' and OC_Config::getValue('forcessl', false));
        }
  
        /**