Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Location of PHP _POST parsing code

Tags:

php

Does anyone know where I can find the code PHP uses to parse post data into $_POST and $_FILES? I'm trying to figure out how it handles unescaped filenames, but I can't seem to find it. It doesn't help that it's a huge project and I have no idea where to even look, and searching isn't helping.

like image 954
Antimony Avatar asked Nov 13 '22 15:11

Antimony


1 Answers

It's in main/rfc1867.c. See within rfc1867_post_handler, around where it is parsing the Content-Disposition header. The function uses php_ap_getword_conf to parse the filename value.

like image 56
Daniel Trebbien Avatar answered Nov 15 '22 04:11

Daniel Trebbien