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

fix download button in PDF previewer #27521

Merged
merged 4 commits into from Apr 7, 2017

Conversation

Projects
None yet
3 participants
@dercorn
Contributor

dercorn commented Mar 28, 2017

fixes the non-functioning download button in PDF previewer.

Confirmed to work with Firefox 52.0.2 (64-bit). Did not break functionality in Chrome 56.0.2924.87 (64-bit) :)

@dercorn dercorn requested a review from PVince81 Mar 28, 2017

Show outdated Hide outdated lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
@@ -372,7 +372,7 @@ public function buildPolicy() {
if(!empty($this->allowedFrameDomains)) {
$policy .= 'frame-src ' . implode(' ', $this->allowedFrameDomains);
$policy .= ';';
$policy .= ' blob:;';

This comment has been minimized.

@PVince81

PVince81 Mar 28, 2017

Member

please use tab, not spaces

@PVince81

PVince81 Mar 28, 2017

Member

please use tab, not spaces

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Mar 28, 2017

Member

👍

Member

PVince81 commented Mar 28, 2017

👍

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Mar 29, 2017

Member

Related failures:

17:43:39 There were 6 failures:
17:43:39 
17:43:39 1) Test\AppFramework\Http\ContentSecurityPolicyTest::testGetAllowedFrameDomain
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com
17:43:39 +default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php:356
17:43:39 
17:43:39 2) Test\AppFramework\Http\ContentSecurityPolicyTest::testGetPolicyFrameDomainValidMultiple
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com www.owncloud.org
17:43:39 +default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com www.owncloud.org blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php:364
17:43:39 
17:43:39 3) Test\AppFramework\Http\ContentSecurityPolicyTest::testGetPolicyDisallowFrameDomainMultiple
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com
17:43:39 +default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php:380
17:43:39 
17:43:39 4) Test\AppFramework\Http\EmptyContentSecurityPolicyTest::testGetAllowedFrameDomain
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';frame-src www.owncloud.com
17:43:39 +default-src 'none';manifest-src 'self';frame-src www.owncloud.com blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php:357
17:43:39 
17:43:39 5) Test\AppFramework\Http\EmptyContentSecurityPolicyTest::testGetPolicyFrameDomainValidMultiple
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';frame-src www.owncloud.com www.owncloud.org
17:43:39 +default-src 'none';manifest-src 'self';frame-src www.owncloud.com www.owncloud.org blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php:365
17:43:39 
17:43:39 6) Test\AppFramework\Http\EmptyContentSecurityPolicyTest::testGetPolicyDisallowFrameDomainMultiple
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';frame-src www.owncloud.com
17:43:39 +default-src 'none';manifest-src 'self';frame-src www.owncloud.com blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php:381
17:43:39 

It should just be a matter of adjusting the expected strings.

Member

PVince81 commented Mar 29, 2017

Related failures:

17:43:39 There were 6 failures:
17:43:39 
17:43:39 1) Test\AppFramework\Http\ContentSecurityPolicyTest::testGetAllowedFrameDomain
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com
17:43:39 +default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php:356
17:43:39 
17:43:39 2) Test\AppFramework\Http\ContentSecurityPolicyTest::testGetPolicyFrameDomainValidMultiple
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com www.owncloud.org
17:43:39 +default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com www.owncloud.org blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php:364
17:43:39 
17:43:39 3) Test\AppFramework\Http\ContentSecurityPolicyTest::testGetPolicyDisallowFrameDomainMultiple
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com
17:43:39 +default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self';frame-src www.owncloud.com blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php:380
17:43:39 
17:43:39 4) Test\AppFramework\Http\EmptyContentSecurityPolicyTest::testGetAllowedFrameDomain
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';frame-src www.owncloud.com
17:43:39 +default-src 'none';manifest-src 'self';frame-src www.owncloud.com blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php:357
17:43:39 
17:43:39 5) Test\AppFramework\Http\EmptyContentSecurityPolicyTest::testGetPolicyFrameDomainValidMultiple
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';frame-src www.owncloud.com www.owncloud.org
17:43:39 +default-src 'none';manifest-src 'self';frame-src www.owncloud.com www.owncloud.org blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php:365
17:43:39 
17:43:39 6) Test\AppFramework\Http\EmptyContentSecurityPolicyTest::testGetPolicyDisallowFrameDomainMultiple
17:43:39 Failed asserting that two strings are identical.
17:43:39 --- Expected
17:43:39 +++ Actual
17:43:39 @@ @@
17:43:39 -default-src 'none';manifest-src 'self';frame-src www.owncloud.com
17:43:39 +default-src 'none';manifest-src 'self';frame-src www.owncloud.com blob:
17:43:39 
17:43:39 /var/lib/jenkins/workspace/owncloud-core_core_PR-27521-RUPRJYZFZEASLHUEXFA7JZ3N4XFEMLJMXN6K7GOYQR5ZQC7JEGUA/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php:381
17:43:39 

It should just be a matter of adjusting the expected strings.

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Mar 31, 2017

Member

Any update on the unit tests ?

Member

PVince81 commented Mar 31, 2017

Any update on the unit tests ?

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Apr 6, 2017

Member

@sharidas can you help fix these unit tests ? Should be trivial

Member

PVince81 commented Apr 6, 2017

@sharidas can you help fix these unit tests ? Should be trivial

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Apr 7, 2017

Member

Thx, let's wait for CI then merge

Member

PVince81 commented Apr 7, 2017

Thx, let's wait for CI then merge

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Apr 7, 2017

Member

jenkins is lazy today...

Member

PVince81 commented Apr 7, 2017

jenkins is lazy today...

@sharidas

This comment has been minimized.

Show comment
Hide comment
@sharidas

sharidas Apr 7, 2017

Member

Taking too much time :(

Member

sharidas commented Apr 7, 2017

Taking too much time :(

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Apr 7, 2017

Member

@sharidas can you try rebasing this once ? That should shake Jenkins a bit...

Member

PVince81 commented Apr 7, 2017

@sharidas can you try rebasing this once ? That should shake Jenkins a bit...

dercorn and others added some commits Mar 28, 2017

Fixing unit tests
This unit test fix the change made for download button in PDF previewer.

Signed-off-by: Sujith H <sharidasan@owncloud.com>
@sharidas

This comment has been minimized.

Show comment
Hide comment
@sharidas
Member

sharidas commented Apr 7, 2017

@PVince81 Done

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Apr 7, 2017

Member

aha, it starts!

Member

PVince81 commented Apr 7, 2017

aha, it starts!

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Apr 7, 2017

Member

failure unrelated

Member

PVince81 commented Apr 7, 2017

failure unrelated

@PVince81 PVince81 merged commit 77886d1 into master Apr 7, 2017

2 of 4 checks passed

continuous-integration/jenkins/pr-head This commit cannot be built
Details
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
Scrutinizer No new issues
Details
license/cla Contributor License Agreement is signed.
Details

@PVince81 PVince81 deleted the Fix_PDF_download_from_preview branch Apr 7, 2017

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Apr 7, 2017

Member

@sharidas please backport to stable9.1 and stable9

Member

PVince81 commented Apr 7, 2017

@sharidas please backport to stable9.1 and stable9

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Apr 10, 2017

Member

links to the backports please ?

Member

PVince81 commented Apr 10, 2017

links to the backports please ?

@sharidas

This comment has been minimized.

Show comment
Hide comment
@sharidas

sharidas Apr 10, 2017

Member

The PR's for stable 9.1: #27605
and for stable 9: #27606

Member

sharidas commented Apr 10, 2017

The PR's for stable 9.1: #27605
and for stable 9: #27606

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