Development

Changeset 10019

You must first sign up to be able to contribute.

Changeset 10019

Show
Ignore:
Timestamp:
06/30/08 15:10:35 (6 years ago)
Author:
pookey
Message:

IPv6 compat fix for IP check in generated dev controller

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/task/generator/sfGenerateAppTask.class.php

    r9531 r10019  
    139139      'IP_CHECK'    => '// this check prevents access to debug front conrollers that are deployed by accident to production servers.'.PHP_EOL. 
    140140                       '// feel free to remove this, extend it or make something more sophisticated.'.PHP_EOL. 
    141                        'if (!in_array(@$_SERVER[\'REMOTE_ADDR\'], array(\'127.0.0.1\')))'.PHP_EOL. 
     141                       'if (!in_array(@$_SERVER[\'REMOTE_ADDR\'], array(\'127.0.0.1\', \'::1\')))'.PHP_EOL. 
    142142                       '{'.PHP_EOL. 
    143143                       '  die(\'Your are not allowed to access this file. Check \'.basename(__FILE__).\' for more information.\');'.PHP_EOL.