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

Rfi Middleware not working correctly #62

Closed
SlawomirLech95 opened this issue Jan 9, 2023 · 1 comment
Closed

Rfi Middleware not working correctly #62

SlawomirLech95 opened this issue Jan 9, 2023 · 1 comment

Comments

@SlawomirLech95
Copy link

SlawomirLech95 commented Jan 9, 2023

Hello, I found two bugs in "Rfi Middleware":

  1. If the last input in request is url (Always $result is true),
  2. The code bellow, also not checks urls because always method checkContent get "true", method checkContent should check items from matched items from the third parameter of preg_match function
if (!$result = preg_match($pattern, $this->applyExceptions($value))) {
    continue;
}

if (!$this->checkContent($result)) {
    continue;
}

"preg_match() returns 1 if the pattern matches given subject, 0 if it does not, or false on failure."

@denisdulici
Copy link
Member

Feel free to send a PR, and I'd be more than happy to review and merge it.

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

No branches or pull requests

2 participants