Skip to content
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

Debug log message when no bearer header found in request #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomneedham
Copy link
Contributor

To aid debugging when apache/$webserver/$proxy strips the auth headers.

@tomneedham tomneedham added this to the development milestone Jul 2, 2018
@tomneedham tomneedham self-assigned this Jul 2, 2018
@codecov
Copy link

codecov bot commented Jul 2, 2018

Codecov Report

Merging #141 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #141      +/-   ##
============================================
+ Coverage     82.12%   82.15%   +0.02%     
  Complexity      199      199              
============================================
  Files            21       21              
  Lines           705      706       +1     
============================================
+ Hits            579      580       +1     
  Misses          126      126
Impacted Files Coverage Δ Complexity Δ
lib/AuthModule.php 89.28% <100%> (+0.39%) 8 <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 61a71b4...32ef140. Read the comment docs.

@@ -43,6 +43,7 @@ public function auth(IRequest $request) {
$authHeader = $request->getHeader('Authorization');

if (strpos($authHeader, 'Bearer ') === false) {
\OC::$server->getLogger()->debug('No Authorization: Bearer header detected', ['app' => 'oauth2']);
Copy link
Member

Choose a reason for hiding this comment

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

this will fire on each and every request with basic auth and/or session cookie (and/or public requests)

but debug mode is okay I guess ..... you might want to add if a cookie (and which) or basic auth headers are in place to support debugging

@GeraldLeikam GeraldLeikam modified the milestones: development, QA Sep 14, 2021
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.

3 participants