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

Smart Filtering gives a 403 error on some environments #1187

Closed
DGStefan opened this issue Jan 4, 2019 · 11 comments
Closed

Smart Filtering gives a 403 error on some environments #1187

DGStefan opened this issue Jan 4, 2019 · 11 comments
Milestone

Comments

@DGStefan
Copy link
Member

DGStefan commented Jan 4, 2019

It seems to be related to the json in the URL.
Although I can't reproduce the issue locally, I was able to login on a clients website and test something with the URL params.
By altering the ac-rules params I was able to reproduce the issue.
So it seems to be related to JSON in the URL that is recognized as malicious by the server (not verified).

@DGStefan
Copy link
Member Author

DGStefan commented Jan 7, 2019

update:
In my case, I had to deactivate the ModSecurity option in Cpanel

@DGStefan
Copy link
Member Author

update:
My hosting service has a WAF active, I guess by ModSecurity. They offer whitelisting of my IP. After doing this, the issue was solved.

@DGStefan DGStefan added this to the 4.5.4 milestone Feb 13, 2019
@jasonb4u
Copy link

I'm a bit cheesed off this has not been fixed. All started since version 4.5.x.

I have 7 different themes and 3 on different serveres, and all have the same issue.

Cannot bulk delete and then gives the 403 error

Image link 1: http://prntscr.com/mnw2nm

Image link 2: http://prntscr.com/mnw3dk

@tobiasschutter
Copy link
Member

tobiasschutter commented Feb 21, 2019

We are encoding the query string parameters for filtering in JSON for easy handling. The type of encoding is what some servers not allow. We are looking into other forms of encoding at the moment.

In the meanwhile, you can disable (smart) filtering and that will prevent the 403 error from triggering.

Add this to your theme's functions.php:

add_filter( 'acp/search/is_active', '__return_false' );

@jasonb4u
Copy link

Whether its on or off, the errors still occurs.

Thanks for the code, hope this all gets dealt with soon, and knowing when I'm to remove that code is a pain.

@DGStefan
Copy link
Member Author

My host is cpanel and cpanel has "Hotlink Protection" (linux)
HotLink Protection is closed as default in cpanel
I opened it and I added to my domain selahattinuzun.com

@DGStefan DGStefan modified the milestones: 4.5.5, 4.5.6 Feb 27, 2019
@DGStefan
Copy link
Member Author

Update:
the iTheme Security uses a setting to optimize the system. There is a point "Non-English characters filter" this is not allowed to has be checked.

@jasonb4u
Copy link

WOW, that seems to woks for those who are using iThemes, but is it still happening for those who not using iThemes
system tweaks
system tweaks 2

@DGStefan
Copy link
Member Author

DGStefan commented Mar 8, 2019

@jasonb4u
Thanks for the clarification on the iThemes solution.
In any use case we had so far, this issue could be solved by tweaking the security settings, on ModSecurity level or on plugin level. Besides that, we have some ways to prevent this error from happening by disabling Smart Filtering. And we changed our code so that the Smart Filtering params are not set to the URL when there is no actual smart filtering active. We do have another last resort solution that would fix the issue for most environments, but since this feels a bit like a hack and unnecessary, we don't know if we're going for that option. Personally, I feel that we can close this issue, but I like to discuss this within the team.

We will at least create a 'How To' tutorial on how to solve this issue based on all the provided solution so far.

@DGStefan DGStefan modified the milestones: 4.5.6, 4.6 Mar 13, 2019
@DGStefan DGStefan closed this as completed Jun 4, 2019
@DGStefan DGStefan modified the milestones: 4.7, 4.6.3 Jun 18, 2019
@meninomiel
Copy link

Any news about this issue?

@DGStefan
Copy link
Member Author

@meninomiel
This issue was already closed since there are no plans to address this on our side.
We are bound to the way Wordpress builds their form on the table pages which is with a GET form.
This forces us to expose the data (which is JSON) in the URL. Some security plugin find that insecure and will block the call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants