Skip to content
Snippets Groups Projects
Select Git revision
  • 701cb27a9e27e26aa6a4460e5a7e4b713b79eac3
  • master default protected
2 results

.htaccess

Blame
    • Lukas Reschke's avatar
      bbd5f284
      Let users configure security headers in their Webserver · bbd5f284
      Lukas Reschke authored
      Doing this in the PHP code is not the right approach for multiple reasons:
      
      1. A bug in the PHP code prevents them from being added to the response.
      2. They are only added when something is served via PHP and not in other cases (that makes for example the newest IE UXSS which is not yet patched by Microsoft exploitable on ownCloud)
      3. Some headers such as the Strict-Transport-Security might require custom modifications by administrators. This was not possible before and lead to buggy situations.
      
      This pull request moves those headers out of the PHP code and adds a security check to the admin settings performed via JS.
      bbd5f284
      History
      Let users configure security headers in their Webserver
      Lukas Reschke authored
      Doing this in the PHP code is not the right approach for multiple reasons:
      
      1. A bug in the PHP code prevents them from being added to the response.
      2. They are only added when something is served via PHP and not in other cases (that makes for example the newest IE UXSS which is not yet patched by Microsoft exploitable on ownCloud)
      3. Some headers such as the Strict-Transport-Security might require custom modifications by administrators. This was not possible before and lead to buggy situations.
      
      This pull request moves those headers out of the PHP code and adds a security check to the admin settings performed via JS.
    index.php 853 B
    <?php
    
    /**
    * ownCloud
    *
    * @author Frank Karlitschek
    * @copyright 2010 Frank Karlitschek karlitschek@kde.org
    *
    * This library is free software; you can redistribute it and/or
    * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
    * License as published by the Free Software Foundation; either
    * version 3 of the License, or any later version.
    *
    * This library is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
    *
    * You should have received a copy of the GNU Affero General Public
    * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
    *
    */
    
    $RUNTIME_NOAPPS = true; //no apps, yet
    
    require_once 'lib/base.php';
    
    OC::handleRequest();