Skip to content

Ensure that the basic auth module is the last module in the list - #30398

Merged
PVince81 merged 1 commit into
masterfrom
bugfix/on-top-off-bugfix/30157
Feb 7, 2018
Merged

PVince81 merged 1 commit into
masterfrom
bugfix/on-top-off-bugfix/30157

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Feb 7, 2018 •

Copy link
Copy Markdown
Contributor

Description

We need to make sure that the BasicAuthModule is the last one to be checked.

Shall fix #30364 (comment)

#30364 (comment)

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@PVince81 PVince81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Of course, because the "auth-modules" would run in the middle 👍

@PVince81

PVince81 commented Feb 7, 2018

Copy link
Copy Markdown
Contributor

@SamuAlfageme

Copy link
Copy Markdown

Will start owncloud/QA#529 (comment) from scratch targetting this patch.

@SamuAlfageme

SamuAlfageme commented Feb 7, 2018 •

Copy link
Copy Markdown

@DeepDiver1975 I think the "Login failed" issue is still reproducing when applying this one over 10.0.7 RC1

Steps:

Prepare the environment:

# Get 10.0.7 RC1 tarball
wget -qO- https://download.owncloud.org/community/testing/owncloud-10.0.7RC1.tar.bz2 | tar xvz
# Start a test container w/ oauth2 and inject the tarball:
OWNCLOUD_APPS_INSTALL=oauth2 OWNCLOUD_APPS_ENABLE=oauth2 \
docker run -p 443:443 -v $(pwd)/owncloud:/var/www/owncloud --name owncloud owncloud/server
# Get this patch: 
docker exec owncloud wget https://github.com/owncloud/core/pull/30398.patch
# Install git & apply the patch
docker exec owncloud bash -c 'apt-get update && apt-get install -y git && git apply -- 30398.patch'

Reproduce the issue:

  1. Login as admin:admin on the webUI
  2. Create an application password in https://localhost/settings/personal?sectionid=security
  3. Use it to (successfully) login on the client
  4. Observe last container logs: docker logs owncloud | grep 'Login failed'

However, while still an issue, I realise it's pretty minor: instead one 'Login failed' entry per client request; there's just one for the /index.php/apps/oauth2/api/v1/token request.

@codecov

codecov Bot commented Feb 7, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #30398 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #30398      +/-   ##
============================================
+ Coverage     60.87%   60.87%   +<.01%     
- Complexity    18567    18568       +1     
============================================
  Files          1093     1093              
  Lines         61324    61325       +1     
============================================
+ Hits          37332    37334       +2     
+ Misses        23992    23991       -1
Impacted Files Coverage Δ Complexity Δ
lib/private/User/Session.php 58.76% <0%> (-0.16%) 140 <0> (+1)
lib/private/Server.php 82.84% <0%> (+0.14%) 129% <0%> (ø) ⬇️
apps/files_trashbin/lib/Expiration.php 98.27% <0%> (+1.72%) 29% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0dd0de1...f02931c. Read the comment docs.

@PVince81

PVince81 commented Feb 7, 2018

Copy link
Copy Markdown
Contributor

codecov result is bullshit. merging

@PVince81
PVince81 merged commit ff441d8 into master Feb 7, 2018
@PVince81
PVince81 deleted the bugfix/on-top-off-bugfix/30157 branch February 7, 2018 17:45
@PVince81

PVince81 commented Feb 7, 2018

Copy link
Copy Markdown
Contributor

please backport to hotfix-10.0.7 and stable10

@PVince81

PVince81 commented Feb 8, 2018

Copy link
Copy Markdown
Contributor

as discussed, #30365 could be the right solution

@lock

lock Bot commented Aug 1, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants