Moved development IP address list to dev-ips.php
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
parent
38e6384018
commit
476b71f470
45
.gitmodules
vendored
Normal file
45
.gitmodules
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
[submodule "vendor/symfony"]
|
||||||
|
path = vendor/symfony
|
||||||
|
url = http://github.com/symfony/symfony.git
|
||||||
|
[submodule "vendor/twig"]
|
||||||
|
path = vendor/twig
|
||||||
|
url = http://github.com/fabpot/Twig.git
|
||||||
|
[submodule "vendor/monolog"]
|
||||||
|
path = vendor/monolog
|
||||||
|
url = http://github.com/Seldaek/monolog.git
|
||||||
|
[submodule "vendor/doctrine-common"]
|
||||||
|
path = vendor/doctrine-common
|
||||||
|
url = http://github.com/doctrine/common.git
|
||||||
|
[submodule "vendor/doctrine-dbal"]
|
||||||
|
path = vendor/doctrine-dbal
|
||||||
|
url = http://github.com/doctrine/dbal.git
|
||||||
|
[submodule "vendor/doctrine"]
|
||||||
|
path = vendor/doctrine
|
||||||
|
url = http://github.com/doctrine/doctrine2.git
|
||||||
|
[submodule "vendor/swiftmailer"]
|
||||||
|
path = vendor/swiftmailer
|
||||||
|
url = http://github.com/swiftmailer/swiftmailer.git
|
||||||
|
[submodule "vendor/assetic"]
|
||||||
|
path = vendor/assetic
|
||||||
|
url = http://github.com/kriswallsmith/assetic.git
|
||||||
|
[submodule "vendor/twig-extensions"]
|
||||||
|
path = vendor/twig-extensions
|
||||||
|
url = http://github.com/fabpot/Twig-extensions.git
|
||||||
|
[submodule "vendor/metadata"]
|
||||||
|
path = vendor/metadata
|
||||||
|
url = http://github.com/schmittjoh/metadata.git
|
||||||
|
[submodule "vendor/bundles/Sensio/Bundle/FrameworkExtraBundle"]
|
||||||
|
path = vendor/bundles/Sensio/Bundle/FrameworkExtraBundle
|
||||||
|
url = http://github.com/sensio/SensioFrameworkExtraBundle.git
|
||||||
|
[submodule "vendor/bundles/JMS/SecurityExtraBundle"]
|
||||||
|
path = vendor/bundles/JMS/SecurityExtraBundle
|
||||||
|
url = http://github.com/schmittjoh/JMSSecurityExtraBundle.git
|
||||||
|
[submodule "vendor/bundles/Sensio/Bundle/DistributionBundle"]
|
||||||
|
path = vendor/bundles/Sensio/Bundle/DistributionBundle
|
||||||
|
url = http://github.com/sensio/SensioDistributionBundle.git
|
||||||
|
[submodule "vendor/bundles/Sensio/Bundle/GeneratorBundle"]
|
||||||
|
path = vendor/bundles/Sensio/Bundle/GeneratorBundle
|
||||||
|
url = http://github.com/sensio/SensioGeneratorBundle.git
|
||||||
|
[submodule "vendor/bundles/Symfony/Bundle/AsseticBundle"]
|
||||||
|
path = vendor/bundles/Symfony/Bundle/AsseticBundle
|
||||||
|
url = http://github.com/symfony/AsseticBundle.git
|
1
vendor/assetic
vendored
Submodule
1
vendor/assetic
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d6f89a3170c5280ad554347dc113eb25fdf00ad7
|
1
vendor/bundles/JMS/SecurityExtraBundle
vendored
Submodule
1
vendor/bundles/JMS/SecurityExtraBundle
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit b564463433aed66e9dddad8cbb761afff5a80cb4
|
1
vendor/bundles/Sensio/Bundle/DistributionBundle
vendored
Submodule
1
vendor/bundles/Sensio/Bundle/DistributionBundle
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 7d75b222c8e4ead64ff82e5c9b2fa3ba71c70cf0
|
1
vendor/bundles/Sensio/Bundle/FrameworkExtraBundle
vendored
Submodule
1
vendor/bundles/Sensio/Bundle/FrameworkExtraBundle
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit e00b525b14784ea4f21c14945e58b4a76a530a6a
|
1
vendor/bundles/Sensio/Bundle/GeneratorBundle
vendored
Submodule
1
vendor/bundles/Sensio/Bundle/GeneratorBundle
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 55ad81e65a1023ae07c67075ca49c55556e047bf
|
1
vendor/bundles/Symfony/Bundle/AsseticBundle
vendored
Submodule
1
vendor/bundles/Symfony/Bundle/AsseticBundle
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit ca447e29f8ee2d38643f2f3a9faae1164aa708fb
|
1
vendor/doctrine
vendored
Submodule
1
vendor/doctrine
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 91ffd30f5210135c9aa43451ef721f28d7e399d9
|
1
vendor/doctrine-common
vendored
Submodule
1
vendor/doctrine-common
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 80838882abc04270fb9bc5812da4ab64e2ee3f88
|
1
vendor/doctrine-dbal
vendored
Submodule
1
vendor/doctrine-dbal
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 2cac730bf48b384e3fdb4daf7d7847e3e42c5684
|
1
vendor/metadata
vendored
Submodule
1
vendor/metadata
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit dbfbb15b3ffdf96c5ff14e5cd4451d78a7083a36
|
1
vendor/monolog
vendored
Submodule
1
vendor/monolog
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit da33c84d07607d5a0ecb1c629fbaa9ae60554542
|
1
vendor/swiftmailer
vendored
Submodule
1
vendor/swiftmailer
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d33d54cc8a081b0b85734744936ede1ba230dd64
|
1
vendor/symfony
vendored
Submodule
1
vendor/symfony
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 7c91ee5755499bc3be26ed4ff5c547db58e32c20
|
1
vendor/twig
vendored
Submodule
1
vendor/twig
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 4c9e394c388a88e15b125175587b9d8a0adc17c2
|
1
vendor/twig-extensions
vendored
Submodule
1
vendor/twig-extensions
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit feb6d3f10c411e2631997c0a905aa581c80305c1
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require 'dev-ips.php';
|
||||||
|
|
||||||
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
|
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
|
||||||
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||||
//umask(0000);
|
//umask(0000);
|
||||||
@ -8,10 +10,7 @@
|
|||||||
// feel free to remove this, extend it, or make something more sophisticated.
|
// feel free to remove this, extend it, or make something more sophisticated.
|
||||||
if (isset($_SERVER['HTTP_CLIENT_IP'])
|
if (isset($_SERVER['HTTP_CLIENT_IP'])
|
||||||
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|
||||||
|| !in_array(@$_SERVER['REMOTE_ADDR'], array(
|
|| !in_array(@$_SERVER['REMOTE_ADDR'], $dev_ips)
|
||||||
'127.0.0.1',
|
|
||||||
'::1',
|
|
||||||
))
|
|
||||||
) {
|
) {
|
||||||
header('HTTP/1.0 403 Forbidden');
|
header('HTTP/1.0 403 Forbidden');
|
||||||
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
|
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require 'dev-ips.php';
|
||||||
|
|
||||||
if (!isset($_SERVER['HTTP_HOST'])) {
|
if (!isset($_SERVER['HTTP_HOST'])) {
|
||||||
exit('This script cannot be run from the CLI. Run it from a browser.');
|
exit('This script cannot be run from the CLI. Run it from a browser.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
|
if (!in_array(@$_SERVER['REMOTE_ADDR'], $dev_ips)) {
|
||||||
'127.0.0.1',
|
|
||||||
'::1',
|
|
||||||
))) {
|
|
||||||
header('HTTP/1.0 403 Forbidden');
|
header('HTTP/1.0 403 Forbidden');
|
||||||
exit('This script is only accessible from localhost.');
|
exit('This script is only accessible from localhost.');
|
||||||
}
|
}
|
||||||
|
6
web/dev-ips.php
Normal file
6
web/dev-ips.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
$dev_ips = array(
|
||||||
|
'127.0.0.1',
|
||||||
|
'::1',
|
||||||
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user