Subversion Repositories ggsysinfo

[/] [modules/] [sysinfo/] [lib/] [PhpSecInfo/] [Test/] [Core/] [file_uploads.php] - Blame information for rev 123

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 123 gg
<?php
2
/**
3
 * Test Class for file_uploads
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_BASE_DIR.'/Test/Test_Core.php');
14
 
15
/**
16
 * Test Class for file_uploads
17
 *
18
 * @package PhpSecInfo
19
 */
20
class PhpSecInfo_Test_Core_File_Uploads extends PhpSecInfo_Test_Core
21
{
22
 
23
        /**
24
         * This should be a <b>unique</b>, human-readable identifier for this test
25
         *
26
         * @var string
27
         */
28
        var $test_name = "file_uploads";
29
 
30
        var $recommended_value = FALSE;
31
 
32
        function _retrieveCurrentValue() {
33
                $this->current_value =  $this->returnBytes(ini_get('file_uploads'));
34
        }
35
 
36
        /**
37
         * Checks to see if expose_php is enabled
38
         *
39
         */
40
        function _execTest() {
41
 
42
                if ($this->current_value == $this->recommended_value) {
43
                        return PHPSECINFO_TEST_RESULT_OK;
44
                }
45
 
46
                return PHPSECINFO_TEST_RESULT_NOTICE;
47
        }
48
 
49
 
50
 
51
        /**
52
         * Set the messages specific to this test
53
         *
54
         */
55
        function _setMessages() {
56
                parent::_setMessages();
57
 
58
                $this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', 'file_uploads are disabled.  Unless you\'re sure you need them, this is the recommended setting');
59
                $this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE, 'en', 'file_uploads are enabled.  If you do not require file upload capability, consider disabling them.');
60
        }
61
 
62
 
63
}