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: do not expose internal errors to the client #6859

Merged
merged 7 commits into from
Apr 18, 2022

Conversation

soulbird
Copy link
Contributor

@soulbird soulbird commented Apr 15, 2022

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

apisix/plugins/wolf-rbac.lua Outdated Show resolved Hide resolved
apisix/plugins/ldap-auth.lua Outdated Show resolved Hide resolved
apisix/plugins/basic-auth.lua Outdated Show resolved Hide resolved
apisix/plugins/wolf-rbac.lua Outdated Show resolved Hide resolved
@@ -284,7 +283,8 @@ function _M.rewrite(conf, ctx)

local consumer_conf = consumer.plugin(plugin_name)
if not consumer_conf then
return 401, fail_response("Missing related consumer")
core.log.warn("Missing related consumer")
return 401, fail_response("Invalid user authorization")
Copy link
Member

Choose a reason for hiding this comment

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

the error here is nothing about the Authorization header

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll reset this modification

@spacewander spacewander merged commit 153f385 into apache:master Apr 18, 2022
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request May 20, 2022
spacewander pushed a commit to spacewander/incubator-apisix that referenced this pull request May 27, 2022
spacewander pushed a commit to spacewander/incubator-apisix that referenced this pull request May 29, 2022
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