We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21255
    • 215 Posts
    Use it for case "id" (see below)
    -- cut --
    case "id" :
    	  if(is_numeric($_REQUEST['id'])) {
                 return intval($_REQUEST['id']);
    -- cut --
    


    Otherwise an attacker could use floats to obfuscate pagecache.

    By the way: Due to theoretical considerations I would recommend exiting on NaN, as given in the original patch. In my opinion, there’s no reason to continue a script if a breakin attempt was detected. If you prefer continuing without an error, you should set $_REQUEST[’id’] = $this->config[’site_start’] to make sure, the malformed request won’t go anywhere else.
    • This is all very interesting! Thank you for patiently explaining cool
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org

      This discussion is closed to further replies. Keep calm and carry on.