Source for file register_globals.php

Documentation is available at register_globals.php

  1. <?php
  2. /**
  3. * Test Class for register_globals
  4. *
  5. * @package PhpSecInfo
  6. * @author Ed Finkler <coj@funkatron.com>
  7. */
  8.  
  9.  
  10. /**
  11. * require the PhpSecInfo_Test_Core class
  12. */
  13. require_once('PhpSecInfo/Test/Test_Core.php');
  14.  
  15.  
  16. /**
  17. * Test Class for register_globals
  18. *
  19. * @package PhpSecInfo
  20. */
  21. class PhpSecInfo_Test_Core_Register_Globals extends PhpSecInfo_Test_Core
  22. {
  23.  
  24. /**
  25. * This should be a <b>unique</b>, human-readable identifier for this test
  26. *
  27. * @var string
  28. */
  29. var $test_name = "register_globals";
  30.  
  31.  
  32. /**
  33. * Checks to see if register_globals is enabled
  34. *
  35. */
  36. function _execTest() {
  37. if (!$this->getBooleanIniValue('register_globals')) {
  38. return PHPSECINFO_TEST_RESULT_OK;
  39. }
  40. return PHPSECINFO_TEST_RESULT_WARN;
  41. }
  42. /**
  43. * Set the messages specific to this test
  44. *
  45. */
  46. function _setMessages() {
  47. parent::_setMessages();
  48. $this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', 'register_globals is disabled, which is the recommended setting');
  49. $this->setMessageForResult(PHPSECINFO_TEST_RESULT_WARN, 'en', 'register_globals is enabled. This could be a serious security risk. You should disable register_globals immediately');
  50. }
  51.  
  52. }

Documentation generated on Tue, 24 Oct 2006 10:53:39 -0400 by phpDocumentor 1.3.0RC3