POST request to save_face.php returns 403 Forbidden — OpenResty

Website URL

https://cicsattendance.site.je/.

Error Message

Hello, I am experiencing the same issue.

My website is https://cicsattendance.site.je/. When my face enrollment page uploads an image to save_face.php using a multipart/form-data POST request, the server returns 403 Forbidden – OpenResty.

The request includes an image file, uid, and index. Normal website login works, but face enrollment uploads fail.

I have restored my original PHP files, but the problem persists. Could you please investigate why multipart image uploads are being blocked?

Thank you.

Other Information

Hello InfinityFree community,

My website is https://cicsattendance.site.je/.

I am developing a student attendance system with face enrollment. When the browser sends a POST request to:

https://cicsattendance.site.je/save_face.php

the server returns 403 Forbidden with an OpenResty error page.

The request contains multipart form data:

image: JPEG image

uid: student database ID

index: capture number

Opening save_face.php directly returns Invalid request, but uploading an image returns HTTP 403. The website itself loads normally.

Could someone help determine why the image-upload request is being blocked and how to resolve it without deleting existing student records or face images?

Thank you.

Welcome to the InfinityFree community forum! Good to have you here.

  • Most people answering here are volunteers. They’re often the fastest source of help. Admin (the only staff member) checks in about once a day for issues on our end.
  • Volunteers can’t see your account or website. Share what you actually see, like error messages and what happens when you try something. That’s more useful than your theory of what’s wrong.
  • AI tools often get InfinityFree wrong. If a volunteer’s advice differs from what an AI told you, please try the volunteer’s suggestion first.
  • Solving an issue is a joint effort. Try the suggestions you get and report back what happened.

Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.

Other people reported a very similar 403 from OpenResty on POST requests today, and it may be the same thing. One of them found that every multipart/form-data POST to any path on their site was blocked, even with no file in it, while the same data sent as application/x-www-form-urlencoded worked.

Their topic is here:

I couldn’t find an answer or a cause in any of those topics, so I don’t know yet whether yours is the same.

To tell the two apart, does a multipart POST with no image, just uid and index, to a different path on your site also return 403? And does the same data sent as a normal URL-encoded form get through to PHP? If both are true, the block is happening before your script runs, so your PHP code isn’t the cause.

Hello, I am experiencing the same issue.

My website is https://cicsattendance.site.je/. When my face enrollment page uploads an image to save_face.php using a multipart/form-data POST request, the server returns 403 Forbidden – OpenResty.

The request includes an image file, uid, and index. Normal website login works, but face enrollment uploads fail.

I have restored my original PHP files, but the problem persists. Could you please investigate why multipart image uploads are being blocked?

Thank you.

Thank you for the information. My website is https://cicsattendance.site.je/.

My face enrollment request sends a multipart/form-data POST containing an image file, uid, and index to save_face.php, and it returns 403 Forbidden – OpenResty.

I have not yet tested a multipart POST without an image or compared it with an application/x-www-form-urlencoded POST. I will test these to help determine whether the request is blocked before PHP executes.

Since this started recently, could this be related to the reported server-side issue affecting multipart POST requests?

Update: I have now tested this on my website, https://cicsattendance.site.je/.

Results:

  • A normal application/x-www-form-urlencoded POST to post_test.php succeeds with HTTP 200, and PHP receives uid=8 and index=1.

  • A multipart/form-data POST to the same post_test.php endpoint, containing only uid=8 and index=1 and no uploaded file, returns HTTP 403 Forbidden – OpenResty.

  • The multipart test uses a correctly configured HTML form with enctype=“multipart/form-data”.

  • The 403 occurs before PHP displays its diagnostic output.

This reproduces the multipart POST blocking issue described in this topic. Could a moderator investigate whether a server-side security rule is rejecting multipart POST requests for my hosting account?

Thank you.

Did you read?