[pLog-svn] r7156 - plog/branches/lifetype-1.2
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Thu Oct 27 10:43:54 EDT 2011
Author: jondaley
Date: 2011-10-27 10:43:54 -0400 (Thu, 27 Oct 2011)
New Revision: 7156
Modified:
plog/branches/lifetype-1.2/runtests.php
Log:
allow runtests to be locked down to an IP
Modified: plog/branches/lifetype-1.2/runtests.php
===================================================================
--- plog/branches/lifetype-1.2/runtests.php 2011-10-27 14:12:54 UTC (rev 7155)
+++ plog/branches/lifetype-1.2/runtests.php 2011-10-27 14:43:54 UTC (rev 7156)
@@ -4,8 +4,11 @@
define( "INCLUDE_PLUGIN_TESTS", true );
- if(!ENABLE_TESTS){
- print "You must change <b>define(\"ENABLE_TESTS\", <font color=\"blue\">false</font>)</b> to <b>define(\"ENABLE_TESTS\", <font color=\"red\">true</font>)</b> at the top of runtests.php to enable the test runner, since it could represent a security risk.";
+ if(ENABLE_TESTS !== TRUE && ENABLE_TESTS != $_SERVER["REMOTE_ADDR"]){
+ print "You must change <b>define(\"ENABLE_TESTS\", <font color=\"blue\">false</font>)</b> to<br/>".
+ "<b>define(\"ENABLE_TESTS\", <font color=\"red\">\"".$_SERVER["REMOTE_ADDR"]."\"</font>)</b> (lock down to your IP address) OR<br/>".
+ "<b>define(\"ENABLE_TESTS\", <font color=\"red\">true</font>)</b><br/>".
+ " at the top of runtests.php to enable the test runner, since it could represent a security risk.";
die;
}
More information about the pLog-svn
mailing list