Skip to content

fix: multi-auth raise 500 error when use default conf#11145

Merged
moonming merged 4 commits into
apache:masterfrom
yuweizzz:bugfix
Apr 24, 2024
Merged

fix: multi-auth raise 500 error when use default conf#11145
moonming merged 4 commits into
apache:masterfrom
yuweizzz:bugfix

Conversation

@yuweizzz

@yuweizzz yuweizzz commented Apr 11, 2024

Copy link
Copy Markdown
Contributor

Description

Fixes: #11156
Related: #9893

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)

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor

please also add test cases

@yuweizzz

Copy link
Copy Markdown
Contributor Author

done, pls check again.

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor

@yuweizzz thanks for your PR but I guess it solves only this off topic problem, which seems completely unrelated from the issue author's problem. If yes, then please create an issue that describes the problem this PR solves.

@yuweizzz

Copy link
Copy Markdown
Contributor Author

yes, I cannot reproduce the first question in #9893, and this pr will fix the second question in #9893, I will create a new one.

end
local ok, err = auth.check_schema(auth_plugin_conf, auth.schema)
if not ok then
return false, "plugin " .. auth_plugin_name .. " check schema failed: " .. err

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.

can you also add a test case which shows this error would be raised if any auth_plugin has wrong configuration.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok

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.

perfect, really appreciate it <3. I will re-review once the CI has completed running.

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.

bug: multi-auth raise 500 error when use default conf

4 participants