[stable9] Disable pastezone for jquery.fileupload #24281

Merged
merged 1 commit into from Apr 26, 2016

Projects

None yet

5 participants

@LukasReschke
Member

Approved backport of #23495

@LukasReschke LukasReschke Disable pastezone for jquery.fileupload
jquery.fileupload offers the [`pastezone`](https://github.com/blueimp/jQuery-File-Upload/wiki/Options#pastezone) functionality. This functionality is enabled by default and if somebody copy-pastes something into Chrome it will automatically trigger an upload of the content to any configured jquery.fileupload element embedded in the JS.

This implementation triggers some problems:

1. The pastezone is defined globally by default (🙈). So if there are multiple fileupload's on a page (such as in the personal settings) then stuff is going to be uploaded to all embedded uploads.
2. Our server code is not able to parse the data. For example for uploads in the files app we expect a file name which is not specified => Just an error is thrown. You can reproduce this by taking a file into your clipboard and in Chrome then pressing <kbd>CTRL + V</kbd>.
3. When copy-pasting some string from MS Office on the personal page a temporary avatar with said content is created.

Considering that this is anyways was never working at all and causes bugs I've set the `pastezone` to `null`. This mens that upload via copy and paste will be disabled.

Lesson learned: Third-party JS libraries can have some weird details.
a70d6f6
@mention-bot

By analyzing the blame information on this pull request, we identified @PVince81, @butonic and @icewind1991 to be potential reviewers

@MorrisJobke
Member

Tested and upload still works 👍

@PVince81
Collaborator

👍

@cmonteroluque cmonteroluque merged commit 438d451 into stable9 Apr 26, 2016

22 checks passed

cla-bot-core Build #3567 succeeded in 19 min
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
core-ci-linux-jsunit/database=sqlite,label=SLAVE Build #61346 succeeded in 20 min
Details
core-ci-linux-swift-primary-storage/database=mysql,label=SLAVE Build #55514 succeeded in 32 min
Details
core-ci-linux/database=mysql,label=SLAVE Build #29973 succeeded in 43 min
Details
core-ci-linux/database=oci,label=SLAVE Build #29973 succeeded in 48 min
Details
core-ci-linux/database=pgsql,label=SLAVE Build #29973 succeeded in 45 min
Details
core-ci-linux/database=sqlite,label=SLAVE Build #29973 succeeded in 23 min
Details
ocs-api-integration-tests-ci Build #10157 succeeded in 14 min
Details
server-master-linux-externals-ci/database=sqlite,external=smb-silvershell,label=SLAVE Build #9783 succeeded in 3 min 25 sec
Details
server-master-linux-externals-ci/database=sqlite,external=swift-ceph,label=SLAVE Build #9783 succeeded in 5 min 24 sec
Details
server-master-linux-externals-ci/database=sqlite,external=webdav-ownCloud,label=SLAVE Build #9783 succeeded in 5 min 36 sec
Details
server-master-linux-externals-smb-windows-ext-ci/database=sqlite,external=smb-windows,label=master Build #12996 succeeded in 2 min 16 sec
Details
server-master-linux-php5.4-ci/database=sqlite,label=SLAVE Build #2914 succeeded in 18 min
Details
server-master-linux-php7-ci/database=sqlite,label=SLAVE Build #38206 succeeded in 11 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=litmus,mirallBranch=v2.0.2,slave=SMASH Build #14096 succeeded in 14 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_basicSync@0,mirallBranch=v2.0.2,slave=SMASH Build #14096 succeeded in 21 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_basicSync@1,mirallBranch=v2.0.2,slave=SMASH Build #14096 succeeded in 34 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_shareLink,mirallBranch=v2.0.2,slave=SMASH Build #14096 succeeded in 40 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePermissions,mirallBranch=v2.0.2,slave=SMASH Build #14096 succeeded in 32 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePropagationGroups,mirallBranch=v2.0.2,slave=SMASH Build #14096 succeeded in 17 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePropagationInsideGroups,mirallBranch=v2.0.2,slave=SMASH Build #14096 succeeded in 20 min
Details
@LukasReschke LukasReschke deleted the backport-disable-paste-zone branch Apr 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment