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

fix: check if there is an email field in userinfo #1663

Merged
merged 2 commits into from
Sep 6, 2021

Conversation

chakku000
Copy link
Contributor

Description

When using OAuth authorization provider which doesn't give email information, oauth_authorized method cause KeyError exception. This is because at Line714, userinfo's email key is accessed even if userinfo does not have email key.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Is CRUD MVC related.
  • Is Auth, RBAC security related.
  • Changes the security db schema.
  • Introduces new feature
  • Removes existing feature

@codecov
Copy link

codecov bot commented Jul 1, 2021

Codecov Report

Merging #1663 (fa19984) into master (f0608fb) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1663   +/-   ##
=======================================
  Coverage   76.43%   76.43%           
=======================================
  Files          55       55           
  Lines        8032     8032           
=======================================
  Hits         6139     6139           
  Misses       1893     1893           
Flag Coverage Δ
python 76.43% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
flask_appbuilder/security/views.py 61.74% <0.00%> (ø)

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 f0608fb...fa19984. Read the comment docs.

Copy link
Owner

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

Thank you for the fix

@dpgaspar dpgaspar merged commit 4d7dad0 into dpgaspar:master Sep 6, 2021
@dpgaspar dpgaspar mentioned this pull request Sep 14, 2021
6 tasks
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.

None yet

2 participants