New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow inline CSS and adjust default CSP policy #13458

Open
LukasReschke opened this Issue Jan 19, 2015 · 2 comments

Comments

Projects
None yet
4 participants
@LukasReschke
Member

LukasReschke commented Jan 19, 2015

… breaking change however required at some point …

@LukasReschke LukasReschke self-assigned this Jan 19, 2015

@DeepDiver1975 DeepDiver1975 added this to the 8.1-next milestone Jan 19, 2015

@LukasReschke

This comment has been minimized.

Member

LukasReschke commented Jan 19, 2015

@LukasReschke

This comment has been minimized.

Member

LukasReschke commented Jan 19, 2015

Requires #11857 before that because some apps such as the Documents app may actually use inline CSS. (not investigated further)

LukasReschke added a commit that referenced this issue Feb 9, 2015

Allow AppFramework applications to specify a custom CSP header
This change allows AppFramework applications to specify a custom CSP header for example when the default policy is too strict. Furthermore this allows us to partially migrate away from CSS and allowed eval() in our JavaScript components.

Legacy ownCloud components will still use the previous policy. Application developers can use this as following in their controllers:
```php
$response = new TemplateResponse('activity', 'list', []);
$cspHelper = new ContentSecurityPolicyHelper();
$cspHelper->addAllowedScriptDomain('www.owncloud.org');
$response->addHeader('Content-Security-Policy', $cspHelper->getPolicy());
return $response;
```

Fixes #11857 which is a pre-requisite for #13458 and #11925

LukasReschke added a commit that referenced this issue Feb 16, 2015

Allow AppFramework applications to specify a custom CSP header
This change allows AppFramework applications to specify a custom CSP header for example when the default policy is too strict. Furthermore this allows us to partially migrate away from CSS and allowed eval() in our JavaScript components.

Legacy ownCloud components will still use the previous policy. Application developers can use this as following in their controllers:
```php
$response = new TemplateResponse('activity', 'list', []);
$cspHelper = new ContentSecurityPolicyHelper();
$cspHelper->addAllowedScriptDomain('www.owncloud.org');
$response->addHeader('Content-Security-Policy', $cspHelper->getPolicy());
return $response;
```

Fixes #11857 which is a pre-requisite for #13458 and #11925

@PVince81 PVince81 modified the milestones: 8.2-next, 8.1-current Apr 23, 2015

@LukasReschke LukasReschke modified the milestones: backlog, 8.2 Feb 29, 2016

@LukasReschke LukasReschke reopened this Feb 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment