Re: register_globals on / off - I think I'm missing the point



On Oct 31, 9:36 am, +mrcakey <mrca...@xxxxxxxxxxxxx> wrote:

Essentially then register_globals exposes ALL your variables to attack
from outside rather than just those you're fetching explicitly from
$_GET, $_POST etc. I understand now. Thanks to all who replied.

+mrcakey

Note: If you can't be sure your code is going to be always in a
globals off environment, it is recommended all variables used in the
script are initialized early on in the script (even the empty ones).
Also one gotcha with globals on is if you do $foo = $_POST['foo'];
don't initialize $foo until you've made sure $_POST['foo'] is empty.


.



Relevant Pages

  • Re: [PHP] Re: A general UL script
    ... I'm trying to validate wether or not to run the image check script. ... Posible to not add an empty field in the submit. ...
    (php.general)
  • Re: whats wrong with find -exec sed?
    ... but did the job faster than writing a script. ... But my first command still doesn't do what it is supposed to. ... files get completly empty now. ... Shouldn't there just be a switch in sed which does the trick? ...
    (alt.os.linux)
  • Re: Replace all script step - flakey?
    ... single step script with a replace statement which acts on the commish field. ... If you want records where BOTH Comm_Flag is empty AND GrandTotal is ...
    (comp.databases.filemaker)
  • Re: CString
    ... My customers don't give a hoot in hell who forgot to initialize a variable --- if the software comes from me, ... Empty(), or set the string explicitly, always, before assuming anything. ... IMO, if you dont need a function call, dont call it. ...
    (microsoft.public.vc.mfc)
  • Re: Enumerate Empty Global Groups
    ... Many thanks for your efforts, the script produced the exact results that I needed. ... You can use ADO to retrieve all ... > where the member attribute is empty. ... > Dim strBase, strFilter, strAttributes, strQuery, objRecordSet ...
    (microsoft.public.windows.server.scripting)