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 resource path pattern matching #132

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix resource path pattern matching #132

wants to merge 2 commits into from

Conversation

philschleier
Copy link
Contributor

This pull request fixes several things related to resource path matching in the oauth-category plugins.

It fixes a critical security issue: The resource path patterns defined in products are not matched against the entire request path but only require a subpath match (missing ^ and $).

Further, it brings the microgateway resource path processing more in line with the documentation at Manage API products by:

  • Allowing the use of single AND double asterisk in one URL
  • Disallowing empty strings with /**

It also makes sure matchesProxyRules remains a boolean instead of the array returned by String.prototype.match().

@keyurkarnik
Copy link
Collaborator

Changes look good. Can you please add a couple of tests to cover this change?

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.

2 participants