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(oauth2) prevent a crash when using a global token #4262

Merged
merged 1 commit into from
Jan 30, 2019

Conversation

thibaultcha
Copy link
Member

When using a token issued by a plugin with global_credentials = true
against a plugin with global_credentials = false, the plugin would
crash due to some indexing of nil fields.

[kong] access.lua:49 [oauth2] failed to get from node cache: callback threw an error: /usr/local/share/lua/5.1/kong/plugins/oauth2/access.lua:580:
    attempt to index field 'service' (a nil value)

Fix #4232

When using a token issued by a plugin with `global_credentials = true`
against a plugin with `global_credentials = false`, the plugin would
crash due to some indexing of nil fields.

    [kong] access.lua:49 [oauth2] failed to get from node cache: callback threw an error: /usr/local/share/lua/5.1/kong/plugins/oauth2/access.lua:580:
        attempt to index field 'service' (a nil value)

Fix #4232
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.

1 participant