X Tutup
Skip to content

fix: CORS on WebDAV is not working#40204

Merged
phil-davis merged 2 commits intoowncloud:masterfrom
caribe:patch-1
Jul 14, 2022
Merged

fix: CORS on WebDAV is not working#40204
phil-davis merged 2 commits intoowncloud:masterfrom
caribe:patch-1

Conversation

@caribe
Copy link
Contributor

@caribe caribe commented Jul 13, 2022

WebDAV is not working at all when used by on browser Javascript because the CORS headers are only present in the OPTION request, but not in the subsequent WebDAV methods.

Description

This behavior is caused by a erroneous json_decode call while retriving the user's domains whitelist. It return an object, so the is_array always fails and no header are sent.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

WebDAV is not working at all when used by on browser Javascript because the CORS headers are only present in the OPTION request, but not in the subsequent WebDAV methods.

This behavior is caused by a erroneous json_decode call while retriving the user's domains whitelist. It return an object, so the is_array always fails and no header are sent.
@CLAassistant
Copy link

CLAassistant commented Jul 13, 2022

CLA assistant check
All committers have signed the CLA.

@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline apiFederationToShares1-git-mariadb10.2-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/core/36305/111

@phil-davis
Copy link
Contributor

@caribe please click the button to "sign" the CLA.

And add a changelog in https://github.com/owncloud/core/tree/master/changelog/unreleased - you will see examples there of Bugfix: changelogs.

@caribe
Copy link
Contributor Author

caribe commented Jul 14, 2022

@caribe please click the button to "sign" the CLA.

And add a changelog in https://github.com/owncloud/core/tree/master/changelog/unreleased - you will see examples there of Bugfix: changelogs.

Ok, done.

@phil-davis
Copy link
Contributor

@caribe thanks for signing the CLA.

I will push a changelog and then merge.

Copy link
Contributor

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks.

@phil-davis phil-davis self-assigned this Jul 14, 2022
@caribe
Copy link
Contributor Author

caribe commented Jul 14, 2022

@caribe thanks for signing the CLA.

I will push a changelog and then merge.

Ops, i did the changelog commit and forgot the PR... here it is #40205

Sorry for that.

@owncloud owncloud deleted a comment from update-docs bot Jul 14, 2022
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebDAV not working using browser js

5 participants

X Tutup