Jump to content

Recommended Posts

Posted

My PHP script is programmed to return a json-ecoded error when certain $_GET parameters are empty, but instead it is returning Apache's default 403 Forbidden screen + Plesk's 500 Internal Server Error screen

Right after, the following stuff appear in the server logs:

ModSecurity: Access denied with code 403 (phase 3). Match of "validateByteRange 0-31" against "ARGS:env" required. [file "/etc/httpd/conf/modsecurity.d/rules/comodo_free/30_Apps_OtherApps.conf"] [line "6649"] [id "243420"] [rev "4"] [msg "COMODO WAF: Information disclosure vulnerability in Eclipse Jetty before 9.2.9.v20150224 (CVE-2015-2080)||murilo.heliohost.us|F|2"] [severity "CRITICAL"] [tag "CWAF"] [tag "OtherApps"] [hostname "murilo.heliohost.us"] [uri "/nnidlt/api.php"] [unique_id "YqzLmsxfvqHEorQQS6SJXgAAARI"]

(20014)Internal error: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function

Please help!

Posted

I found this on StackOverflow regarding that error:

Quote

The warning has nothing to do with any of the Fcgidxxx options and is simply caused by client's closing their side of the connection before the server gets a chance to respond.

Source: https://stackoverflow.com/a/48468294/2336864

It sounds like maybe it's a client issue maybe? How long does your PHP script take to finish?

  • Like 1
Posted
30 minutes ago, murilo said:

First of all the working link has "nnidlt" and the invalid link has "niidlt" so that's why it's giving a 404 error.

The problem is this line

http_response_code(400);

I commented that out and now it gives the expected JSON response. https://murilo.heliohost.us/nnidlt/api.php?env=production&user_id= It seems like Plesk is trying to give some custom error page for 400 errors for some reason. Not sure why. Does that script need to return a 400 error or is 200 response with the correct json error enough?

  • Like 1
Posted
9 minutes ago, Krydos said:

First of all the working link has "nnidlt" and the invalid link has "niidlt" so that's why it's giving a 404 error.

 

Oh, sorry, my bad. I typed the link manually.

9 minutes ago, Krydos said:

I commented that out and now it gives the expected JSON response. https://murilo.heliohost.us/nnidlt/api.php?env=production&user_id= It seems like Plesk is trying to give some custom error page for 400 errors for some reason. Not sure why. Does that script need to return a 400 error or is 200 response with the correct json error enough?

Hmm... weird. Yes, it's meant to give 400 since the JavaScript that pulls from that API looks for a response code different from 200 to display the error mesage. I can try using another response code I guess.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...