Skip to content

Check for empty authorization headers for office requests - #19180

Merged
rullzer merged 1 commit into
masterfrom
bugfix/office-anonymous-empty-auth
Feb 5, 2020
Merged

Check for empty authorization headers for office requests#19180
rullzer merged 1 commit into
masterfrom
bugfix/office-anonymous-empty-auth

Conversation

@juliusknorr

@juliusknorrjuliusknorr commented Jan 28, 2020

Copy link
Copy Markdown
Member

Apparently some office versions do also sent an request without an authorization header or with Authorization: Bearer and expect the request to return a successful status for their HEAD request. The OPTIONS request is also not only performed on the root folder but the parent one.

This should fix opening Office files from a mounted webdav drive in Windows without requesting the credentials again.

Follow up to #16739

@juliusknorrjuliusknorr added bug 3. to review Waiting for reviews labels Jan 28, 2020
@juliusknorrjuliusknorr added this to the Nextcloud 19 milestone Jan 28, 2020
@juliusknorrjuliusknorr added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Jan 28, 2020
…nonymous option on the whole tree
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr
juliusknorrforce-pushed the bugfix/office-anonymous-empty-auth branch from f5e3d56 to 8fba05dCompareFebruary 4, 2020 14:35
@juliusknorrjuliusknorr added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Feb 4, 2020
@juliusknorr

Copy link
Copy Markdown
MemberAuthor

Tests should also be happy now.

}

public function testAnonymousHead() {
$response = $this->sendRequest('HEAD', '', 'Microsoft Office does strange things');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

😆

@rullzer
rullzer merged commit bef906b into masterFeb 5, 2020
@rullzer
rullzer deleted the bugfix/office-anonymous-empty-auth branch February 5, 2020 19:08
@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport to stable18

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport to stable17

@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable18 in #20282

@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable17 in #20283

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

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@juliusknorr@rullzer@icewind1991