Code Duplication    Length = 7-12 lines in 3 locations

phpsecinfo/PhpSecInfo/Test/Core/upload_tmp_dir.php 1 location

@@ 87-98 (lines=12) @@
84
	 * Set the messages specific to this test
85
	 *
86
	 */
87
	function _setMessages() {
88
		parent::_setMessages();
89
90
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTRUN, 'en', 'Test not run -- currently disabled on Windows OSes');
91
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', 'upload_tmp_dir is enabled, which is the
92
						recommended setting. Make sure your upload_tmp_dir path is not world-readable');
93
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_WARN, 'en', 'unable to retrieve file permissions on upload_tmp_dir');
94
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE, 'en', 'upload_tmp_dir is disabled, or is set to a
95
						common world-writable directory.  This typically allows other users on this server
96
						to access temporary copies of files uploaded via your PHP scripts.  You should set
97
						upload_tmp_dir to a non-world-readable directory');
98
	}
99
100
}

phpsecinfo/PhpSecInfo/Test/Session/save_path.php 1 location

@@ 93-103 (lines=11) @@
90
	 * Set the messages specific to this test
91
	 *
92
	 */
93
	function _setMessages() {
94
		parent::_setMessages();
95
96
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTRUN, 'en', 'Test not run -- currently disabled on Windows OSes');
97
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', 'save_path is enabled, which is the
98
						recommended setting. Make sure your save_path path is not world-readable');
99
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_WARN, 'en', 'unable to retrieve file permissions on save_path');
100
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE, 'en', 'save_path is disabled, or is set to a
101
						common world-writable directory.  This typically allows other users on this server
102
						to access session files. You should set	save_path to a non-world-readable directory');
103
	}
104
105
}

phpsecinfo/PhpSecInfo/Test/Test.php 1 location

@@ 159-165 (lines=7) @@
156
	 * than the constructor for ease of extension purposes (php4 is whack, man).
157
	 *
158
	 */
159
	function _setMessages() {
160
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK,		'en', 'This setting should be safe');
161
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE,	'en', 'This could potentially be a security issue');
162
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_WARN,	'en', 'This setting may be a serious security problem');
163
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_ERROR,	'en', 'There was an error running this test');
164
		$this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTRUN,	'en', 'This test cannot be run');
165
	}
166
167
168
	/**