Hey all,
Does anyone know if $_SERVER['REQUEST_METHOD'] can be trusted?
If it can be trusted, would that mean that something like the following is sane?
My reasoning behind this is that I only want an attack reported once so the impact value is consistant.Code:if(!in_array($_SERVER['REQUEST_METHOD'], array('GET', 'POST'))) { // check $_REQUEST $request = array( 'REQUEST' => $_REQUEST, 'COOKIE' => $_COOKIE ); } else { $request = array( 'GET' => $_GET, 'POST' => $_POST, 'COOKIE' => $_COOKIE ); }
Is there a problem with this? Or should I be checking everything (as in REQUEST, GET, POST, COOKIE) on every request?
thanks for your time,
ampt


Zitieren
Lesezeichen