Skip to content
Snippets Groups Projects
  1. Jan 07, 2019
  2. Oct 14, 2018
  3. Sep 15, 2017
  4. Mar 29, 2017
  5. Mar 16, 2017
  6. May 20, 2016
    • Joas Schilling's avatar
      Move tests/ to PSR-4 (#24731) · 94ad54ec
      Joas Schilling authored
      * Move a-b to PSR-4
      
      * Move c-d to PSR-4
      
      * Move e+g to PSR-4
      
      * Move h-l to PSR-4
      
      * Move m-r to PSR-4
      
      * Move s-u to PSR-4
      
      * Move files/ to PSR-4
      
      * Move remaining tests to PSR-4
      
      * Remove Test\ from old autoloader
      94ad54ec
  7. May 18, 2016
  8. Jan 28, 2016
    • Lukas Reschke's avatar
      Add public API to give developers the possibility to adjust the global CSP defaults · 809ff5ac
      Lukas Reschke authored
      Allows to inject something into the default content policy. This is for
      example useful when you're injecting Javascript code into a view belonging
      to another controller and cannot modify its Content-Security-Policy itself.
      Note that the adjustment is only applied to applications that use AppFramework
      controllers.
      
      To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`,
      $policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`.
      
      To test this add something like the following into an `app.php` of any enabled app:
      ```
      $manager = \OC::$server->getContentSecurityPolicyManager();
      $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false);
      $policy->addAllowedFrameDomain('asdf');
      $policy->addAllowedScriptDomain('yolo.com');
      
      $policy->allowInlineScript(false);
      $manager->addDefaultPolicy($policy);
      $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false);
      $policy->addAllowedFontDomain('yolo.com');
      $manager->addDefaultPolicy($policy);
      
      $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false);
      $policy->addAllowedFrameDomain('banana.com');
      $manager->addDefaultPolicy($policy);
      ```
      
      If you now open the files app the policy should be:
      
      ```
      Content-Security-Policy:default-src 'none';script-src yolo.com 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src yolo.com 'self';connect-src 'self';media-src 'self';frame-src asdf banana.com 'self'
      ```
      809ff5ac
  9. Sep 29, 2015
  10. Aug 07, 2015
  11. May 20, 2015
  12. Feb 28, 2015
    • Lukas Reschke's avatar
      Add support for 'child-src' directive · b29940d9
      Lukas Reschke authored
      This is required when working with stuff such as PDF.js in the files_pdfviewer application. Opt-in only.
      
      Master change only because the stable CSP policies has a failback that allows nearly anything :see_no_evil:
      b29940d9
  13. Feb 16, 2015
Loading