Plugin Directory

Changeset 998103


Ignore:
Timestamp:
09/28/2014 07:40:27 PM (11 years ago)
Author:
cbergen
Message:

tagging v1.1.0

Location:
gauntlet-security
Files:
46 edited
1 copied

Legend:

Unmodified
Added
Removed
  • gauntlet-security/tags/1.1.0/README.txt

    r990695 r998103  
    55Requires at least: 3.4
    66Tested up to: 4.0
    7 Stable tag: 1.0.1
     7Stable tag: 1.1.0
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1010
    11 Performs a detailed security analysis of your WordPress installation. Gives tips on how to make your site more secure.
     11Performs a detailed security analysis of your WordPress installation. Suggests ways to make your site more secure.
    1212
    1313== Description ==
     
    2424* Block files in the includes directory
    2525* Rename or move the content directory
     26* Make sure your server is not vulnerable to the Shellshock Bash bug
    2627* Disable dangerous PHP functions
    2728* Disable allow_url_include and allow_url_fopen PHP flags
     
    4445* Users should not display their login usernames publicly
    4546* Prevent username enumeration through standard author URLs
    46 * ...more tests are planned
     47* ...more tests planned
    4748
    4849Check the [screenshots](screenshots) tab above for more detail on some of the above features.
     
    9899== Changelog ==
    99100
     101= 1.1.0 =
     102* New test: Check for Shellshock bug
     103* Enhancement: Add reference links to many tests for more information
     104* Enhancement: Improve PHP display errors check
     105* Enhancement: Improve TimThumb check
     106
    100107= 1.0.1 =
    101108* Fix: TimThumb test
  • gauntlet-security/tags/1.1.0/admin/assets/js/admin.js

    r988766 r998103  
    1818            */
    1919            var tests = [
    20                 ['gus_FilePermissions', 'slow'],
    21                 ['gus_DirectoryIndexing', 2],
    22                 ['gus_ExecutableUploads', 2],
    23                 ['gus_SecureIncludes', 2],
    24                 ['gus_WpContentLocation', 2],
    25                 ['gus_PhpFunctions', 2],
    26                 ['gus_PhpAllowUrl', 2],
    27                 ['gus_DbPassword', 2],
    28                 ['gus_WpTable', 2],
    29                 ['gus_WpVersion', 2],
    30                 ['gus_PhpDisplayErrors', 2],
    31                 ['gus_FileEditing', 2],
    32                 ['gus_KeysAndSalts', 2],
    33                 ['gus_WpGenerator', 2],
    34                 ['gus_AnyoneCanRegister', 2],
    35                 ['gus_SslAdmin', 2],
    36                 ['gus_PluginAudit', 'slow'],
    37                 ['gus_UnusedThemes', 2],
    38                 ['gus_BmuhtMit', 'slow'],
    39                 ['gus_AdminUsername', 2],
    40                 ['gus_CommonPasswords', 'slow'],
    41                 ['gus_UserIdOne', 'slow'],
    42                 ['gus_AdminCount', 'slow'],
    43                 ['gus_NickNames', 'slow'],
    44                 ['gus_UserNames', 'slow']
     20                ['gus_Shellshock', 'slow'],
     21                ['gus_FilePermissions', 'slow'],
     22                ['gus_DirectoryIndexing', 2],
     23                ['gus_ExecutableUploads', 2],
     24                ['gus_SecureIncludes', 2],
     25                ['gus_WpContentLocation', 2],
     26                ['gus_PhpFunctions', 2],
     27                ['gus_PhpAllowUrl', 2],
     28                ['gus_DbPassword', 2],
     29                ['gus_WpTable', 2],
     30                ['gus_WpVersion', 2],
     31                ['gus_PhpDisplayErrors', 2],
     32                ['gus_FileEditing', 2],
     33                ['gus_KeysAndSalts', 2],
     34                ['gus_WpGenerator', 2],
     35                ['gus_AnyoneCanRegister', 2],
     36                ['gus_SslAdmin', 2],
     37                ['gus_PluginAudit', 'slow'],
     38                ['gus_UnusedThemes', 2],
     39                ['gus_BmuhtMit', 'slow'],
     40                ['gus_AdminUsername', 2],
     41                ['gus_CommonPasswords', 'slow'],
     42                ['gus_UserIdOne', 'slow'],
     43                ['gus_AdminCount', 'slow'],
     44                ['gus_NickNames', 'slow'],
     45                ['gus_UserNames', 'slow']
    4546            ];
    4647            var finished_tests = 0;
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_AdminCount.php

    r988766 r998103  
    127127    }
    128128
     129    protected function references()
     130    {
     131        return <<<EOD
     132           
     133        <a href='http://codex.wordpress.org/Brute_Force_Attacks'>Codex: Brute Force Attacks</a><br>
     134
     135EOD;
     136    }
    129137}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_BmuhtMit.php

    r990695 r998103  
    3636
    3737        $timthumb_keywords = array(
    38             '/timthumb.php',
    39             '/thumb.php',
    40             '/pics.php',
    41             '/image.php',
    42             '/upload.php',
     38            'image',
     39            'img',
     40            'pic',
     41            'thumb',
     42            'tim.php',
     43            'tt.php',
     44            'upload',
    4345        );
    4446       
     
    4850
    4951            $file_part = strtolower(strrchr($path, '/'));
    50             if( in_array ( $file_part, $timthumb_keywords ) )
    51             {
    52                 error_log("checking... " . $path);
    53 
    54                 if( $file_handle = @fopen( $path, 'r' ) )
     52
     53            $suspicious = false;
     54            foreach($timthumb_keywords as $k)
     55            {
     56                if( strpos( $file_part, $k ) !== false )
    5557                {
    56                     $contents = @fread( $file_handle, 1250 ); // just the first few bytes
    57                     @fclose($file_handle);
    58                    
    59                     $this->run_sub_test( array(
    60                         'path' => $path,
    61                         'contents' => $contents,
    62                     ) );
     58                    $suspicious = true;
     59                    break;
    6360                }
     61            }
     62               
     63            if( $suspicious && $file_handle = @fopen( $path, 'r' ) )
     64            {
     65                $contents = @fread( $file_handle, 1250 ); // just the first few bytes
     66                @fclose($file_handle);
     67               
     68                $this->run_sub_test( array(
     69                    'path' => $path,
     70                    'contents' => $contents,
     71                ) );
    6472            }
    6573        }
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_CommonPasswords.php

    r990695 r998103  
    182182        return 'Intermediate';
    183183    }
     184
     185    protected function references()
     186    {
     187        return <<<EOD
     188           
     189        <a href='http://codex.wordpress.org/Brute_Force_Attacks'>Codex: Brute Force Attacks</a><br>
     190
     191EOD;
     192    }
    184193}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_DirectoryIndexing.php

    r988766 r998103  
    7070    protected function how_to_fix()
    7171    {
     72        $code1 = <<<EOD
     73
     74<IfModule mod_autoindex.c>
     75Options -Indexes
     76</IfModule>
     77
     78EOD;
     79        $code1 = htmlentities(trim($code1));
     80           
    7281        return <<<EOD
    7382           
     
    7786        So to turn off directory indexing site-wide, add this to the .htaccess file in your web root:
    7887       
    79         <code class='prettyprint'>Options -Indexes</code>
     88        <code class='prettyprint'>{$code1}</code>
    8089       
    8190EOD;
     
    8695        return 'Intermediate';
    8796    }
     97   
     98    protected function references()
     99    {
     100        return <<<EOD
     101           
     102    <a href='https://github.com/h5bp/server-configs-apache'>Apache Server Configs: HTML5 Boilerplate</a><br>
     103       
     104EOD;
     105    }
    88106   
    89107}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_ExecutableUploads.php

    r988766 r998103  
    150150        return "Intermediate";
    151151    }
     152
     153    protected function references()
     154    {
     155        return <<<EOD
     156           
     157        <a href='http://www.askapache.com/htaccess/using-filesmatch-and-files-in-htaccess.html'>Ask Apache: Using FilesMatch and Files in htaccess</a><br>
     158        <a href='http://docstore.mik.ua/orelly/linux/apache/ch05_06.htm'>Apache: The Definitive Guide: 5.6. Order, Allow, and Deny</a><br>
     159EOD;
     160    }
     161   
    152162}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_FileEditing.php

    r990695 r998103  
    110110        return 'Easy';
    111111    }   
    112    
     112
     113    protected function references()
     114    {
     115        return <<<EOD
     116           
     117        <a href='http://codex.wordpress.org/Hardening_WordPress#Disable_File_Editing'>Codex: Disable File Editing - Hardening WordPress</a><br>
     118
     119EOD;
     120    }
    113121}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_FilePermissions.php

    r988766 r998103  
    220220        return 'Advanced';
    221221    }
     222   
     223    protected function references()
     224    {
     225        return <<<EOD
     226           
     227            <a href='http://codex.wordpress.org/Hardening_WordPress#File_Permissions'>Codex: File Permissions - Hardening Wordpress</a><br>
     228            <a href='http://codex.wordpress.org/Changing_File_Permissions'>Codex: Changing File Permissions</a>   
     229       
     230EOD;
     231    }
    222232}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_KeysAndSalts.php

    r988766 r998103  
    149149    }   
    150150   
     151    protected function references()
     152    {
     153        return <<<EOD
     154           
     155        <a href='http://codex.wordpress.org/Editing_wp-config.php#Security_Keys'>Codex: Security Keys - Editing wp-config.php</a><br>
     156
     157EOD;
     158    }
     159   
     160   
    151161}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_PhpAllowUrl.php

    r988766 r998103  
    129129        $code = <<<EOD
    130130
    131 allow_url_include = Off
    132 allow_url_fopen = Off
     131allow_url_include = 'off'
     132allow_url_fopen = 'off'
    133133
    134134EOD;
     
    164164    }
    165165   
     166    protected function references()
     167    {
     168        return <<<EOD
     169           
     170        <a href='http://codex.wordpress.org/HTTP_API'>Codex: HTTP API</a><br>
     171        <a href='http://php.net/manual/en/features.remote-files.php'>PHP Manual: Using remote files</a><br>
     172
     173EOD;
     174    }
    166175}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_PhpDisplayErrors.php

    r988766 r998103  
    33class gus_PhpDisplayErrors extends gus_TestBase
    44{
     5    protected $test_table_show = true;
     6    protected $test_table_headers = false;
     7    protected $test_table_fail_only = false;
     8
    59    protected function main_check()
    610    {
    7         if( ! defined( 'WP_DEBUG' ) || WP_DEBUG == false )
    8         {
    9             $this->pass();
    10         }
    11         elseif( defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY == false )
    12         {
    13             $this->pass();
     11        $wp_debug = ( WP_DEBUG ) ? 'true' : 'false' ;
     12        $wp_debug_log = ( WP_DEBUG_LOG ) ? 'true' : 'false' ;
     13        $ini_display_errors = ( ini_get('display_errors') == '1' ) ? 'on' : 'off';
     14       
     15        if ( WP_DEBUG_DISPLAY )
     16        {
     17            $wp_debug_display = 'true';
     18        }
     19        elseif ( null !== WP_DEBUG_DISPLAY )
     20        {
     21            $wp_debug_display = 'false';
    1422        }
    1523        else
    16         {
    17             $this->critical_fail();
    18         }
    19     }
     24        {
     25            $wp_debug_display = 'null';
     26        }
     27
     28        $configs = array(
     29            'WP_DEBUG' => $wp_debug,
     30            'WP_DEBUG_LOG' => $wp_debug_log,
     31            'WP_DEBUG_DISPLAY' => $wp_debug_display,
     32            "ini_set( 'display_errors' )" => $ini_display_errors,
     33        );       
     34
     35        $this->run_sub_test( array(
     36            'config' =>  'WP_DEBUG',
     37            'configs' => $configs,
     38        ) );
     39       
     40        /*
     41            Only display WP_DEBUG_LOG if WP_DEBUG is true
     42        */
     43        if( WP_DEBUG )
     44        {
     45            $this->run_sub_test( array(
     46                'config' =>  "WP_DEBUG_LOG",
     47                'configs' => $configs,
     48            ) );
     49        }
     50
     51        /*
     52            Only display WP_DEBUG_DISPLAY if WP_DEBUG is true
     53        */
     54        if( WP_DEBUG )
     55        {
     56            $this->run_sub_test( array(
     57                'config' =>  "WP_DEBUG_DISPLAY",
     58                'configs' => $configs,
     59            ) );
     60        }
     61
     62        if( (WP_DEBUG && WP_DEBUG_DISPLAY) || (WP_DEBUG && WP_DEBUG_DISPLAY == false) )
     63        {
     64            // No need to run the ini display_errors check
     65        }
     66        else
     67        {
     68            $this->run_sub_test( array(
     69                'config' =>  "ini_set( 'display_errors' )",
     70                'configs' => $configs,
     71            ) );
     72        }
     73
     74    }
     75
     76    protected function sub_test($args)
     77    {
     78        $config = $args['config'];
     79        $configs = $args['configs'];
     80
     81
     82        // Critical Fails...
     83       
     84        // WP_DEBUG         = true      (should be false)
     85        // display_errors   = true      (should be false)     
     86
     87        // WP_DEBUG         = false
     88        // display_errors   = true      (should be false)
     89
     90
     91        // Fails...
     92       
     93        // WP_DEBUG         = true      (should be false)
     94        // display_errors   = false
     95
     96
     97        // Passes...
     98       
     99        // WP_DEBUG         = false
     100        // display_errors   = false
     101
     102
     103
     104
     105        if( $config == 'WP_DEBUG' )
     106        {
     107            if( WP_DEBUG && $configs["ini_set( 'display_errors' )"] == 'on' )
     108            {
     109                $pass = 'critical';
     110            }
     111            elseif( WP_DEBUG && $configs["ini_set( 'display_errors' )"] == 'off' )
     112            {
     113                $pass = 'fail';
     114                $configs['WP_DEBUG'] = "<span class='error'>" . $configs['WP_DEBUG'] . "</span>";
     115            }
     116            else
     117            {
     118                $pass = 'pass';
     119            }
     120        }
     121       
     122        if( $config == 'WP_DEBUG_LOG' )
     123        {
     124            if( $configs['WP_DEBUG_LOG'] == 'true' )
     125            {
     126                $pass = 'fail';
     127                $configs['WP_DEBUG_LOG'] = "<span class='error'>" . $configs['WP_DEBUG_LOG'] . "</span>";
     128            }
     129            else
     130            {
     131                $pass = 'pass';
     132            }
     133        }       
     134       
     135        if( $config == 'WP_DEBUG_DISPLAY' )
     136        {
     137            if( WP_DEBUG && $configs['WP_DEBUG_DISPLAY'] == 'null' && $configs["ini_set( 'display_errors' )"] == 'on' )
     138            {
     139                $pass = 'critical';
     140            }
     141            elseif( WP_DEBUG && $configs['WP_DEBUG_DISPLAY'] == 'true' )
     142            {
     143                $pass = 'critical';
     144            }
     145            else
     146            {
     147                $pass = 'pass';
     148            }
     149        }       
     150       
     151        if( $config == "ini_set( 'display_errors' )" )
     152        {
     153            if( $configs["ini_set( 'display_errors' )"] == 'on' )
     154            {
     155                $pass = 'critical';
     156            }
     157            else
     158            {
     159                $pass = 'pass';
     160            }
     161        }       
     162       
     163        return array(
     164            'pass' => $pass,
     165            'table_columns' => array(
     166                'Config' => $config,
     167                'Value' => $configs[$config],
     168            ),
     169        );
     170       
     171    }
     172
    20173
    21174    public function title()
     
    28181           
    29182            case 'fail':
     183            return 'PHP errors are not being displayed to the user';
     184            break;
     185           
    30186            case 'critical':
    31187            return 'PHP errors are being displayed to the user';
     
    48204           
    49205            case 'fail':
     206            return 'PHP errors are not being displayed to the user, but WP_DEBUG should be false';
     207            break;
     208           
    50209            case 'critical':
    51             return 'PHP errors are being displayed to the user';
     210            return "PHP errors are being displayed to the user";
    52211            break;
    53212        }
     
    66225    protected function how_to_fix()
    67226    {
     227        $code1 = <<<EOD
     228
     229define( 'WP_DEBUG', false );
     230ini_set( 'display_errors', 'off' );
     231
     232EOD;
     233        $code1 = trim($code1);
     234       
    68235        $code2 = <<<EOD
    69236
     
    79246        return <<<EOD
    80247
    81         If you are not doing any debugging on a public site then add this configuration option
    82         in wp-config.php:
    83    
    84         <code class='prettyprint'>define( 'WP_DEBUG', false );</code>
     248        If you are not doing any debugging on a public site then add this to your wp-config.php:
     249   
     250        <code class='prettyprint'>{$code1}</code>
    85251
    86252        If you are temporarily debugging a production site, then use this combination of settings:
     
    100266        return 'Easy';
    101267    }   
     268
     269    protected function references()
     270    {
     271        return <<<EOD
     272           
     273        <a href='http://codex.wordpress.org/Debugging_in_WordPress'>Codex: Debugging in WordPress</a><br>
     274
     275EOD;
     276    }
     277   
    102278}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_PhpFunctions.php

    r990695 r998103  
    131131    }
    132132
     133    protected function references()
     134    {
     135        return <<<EOD
     136           
     137        <a href='http://stackoverflow.com/a/3697776/3976381'>Stack Overflow: Exploitable PHP functions</a><br>
     138
     139EOD;
     140    }
    133141}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_PluginAudit.php

    r990695 r998103  
    224224        return 'Easy';
    225225    }
     226   
     227   
     228   
     229    protected function references()
     230    {
     231        return <<<EOD
     232   
     233        <a href='https://wordpress.org/plugins/'>WordPress Plugin Directory</a><br>
     234        <a href='http://web.nvd.nist.gov/view/vuln/search-results?query=wordpress&search_type=all&cves=on'>National Vulnerability Database</a><br>
     235
     236EOD;
     237    }
     238   
    226239
    227240}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_SecureIncludes.php

    r988766 r998103  
    148148EOD;
    149149    }
    150    
    151     protected function fix_difficulty()
    152     {
    153         return "Intermediate";
    154     }
     150   
     151    protected function fix_difficulty()
     152    {
     153        return "Intermediate";
     154    }
     155   
     156    protected function references()
     157    {
     158        return "<a href='http://codex.wordpress.org/Hardening_WordPress#Securing_wp-includes'>Codex: Securing wp-includes - Hardening Wordpress</a>";
     159    }
    155160}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_SslAdmin.php

    r988766 r998103  
    125125        <code class="prettyprint">define('FORCE_SSL_ADMIN', true);</code>
    126126       
    127         ...but setting up SSL on your server is not so simple. For more information, start here:
    128         <a target='_blank' href='http://codex.wordpress.org/Administration_Over_SSL'>codex.wordpress.org/Administration_Over_SSL</a>
    129        
     127        ...but setting up SSL on your server is not so simple. (See the reference below more info.)
     128       
    130129EOD;
    131130    }
     
    135134        return 'Advanced';
    136135    }
     136
     137    protected function references()
     138    {
     139        return <<<EOD
     140           
     141        <a href='http://codex.wordpress.org/Administration_Over_SSL'>Codex: Administration Over SSL</a><br>
     142
     143EOD;
     144    }
     145   
    137146   
    138147}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_TestBase.php

    r988766 r998103  
    7171
    7272            case 'undetermined':
    73                 $this->undetermined();
     73                if($this->pass !== 'critical')
     74                {
     75                    $this->undetermined();
     76                }
    7477            break;
    7578        }
     79       
     80        return $sub_test;
    7681    }
    7782
     
    8186    protected function how_to_fix(){}
    8287    protected function fix_difficulty(){}
     88    protected function references(){}
    8389   
    8490   
     
    238244EOD;
    239245        }
    240        
    241         if( $html = $this->how_to_fix() )
    242         {
    243             if( $difficulty = $this->fix_difficulty() )
    244             {
    245                 $difficulty = "<p><strong>Difficulty:</strong> {$difficulty}</p>\n";
    246             }
    247             else
    248             {
    249                 $difficulty = '';
    250             }
    251            
    252             $this->message .= <<<EOD
    253            
    254             <div class='how_to_fix'>           
    255                 <h3>How can this be fixed?</h3>             
    256                 {$difficulty}       
    257                 {$html}             
    258             </div>
    259 EOD;
    260         }
     246       
     247        if( $html = $this->how_to_fix() )
     248        {
     249            if( $difficulty = $this->fix_difficulty() )
     250            {
     251                $difficulty = "<p><strong>Difficulty:</strong> {$difficulty}</p>\n";
     252            }
     253            else
     254            {
     255                $difficulty = '';
     256            }
     257           
     258            $this->message .= <<<EOD
     259           
     260            <div class='how_to_fix'>           
     261                <h3>How can this be fixed?</h3>               
     262                {$difficulty}       
     263                {$html}               
     264            </div>
     265EOD;
     266        }
     267       
     268        if( $html = $this->references() )
     269        {
     270            $this->message .= <<<EOD
     271           
     272            <div class='recommendations'>
     273                <h3>References</h3>
     274                {$html}
     275            </div>
     276EOD;
     277        }
    261278    }
    262279
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_TestRunner.php

    r988766 r998103  
    1111
    1212        // File access
     13        $this->tests[] = array('gus_Shellshock', 'Files');
    1314        $this->tests[] = array('gus_FilePermissions', 'Files');
    1415        $this->tests[] = array('gus_DirectoryIndexing', 'Files');
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_UserNames.php

    r988766 r998103  
    2929            /*
    3030                Also display the (redirected) permalink for the URL if applicable
    31                     Ex: http://wp-security-plugin:8888/author/user-login
     31                    Ex: http://example.com/author/user-login
    3232            */
    3333            if($response['response']['code'] == 301)
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_WpContentLocation.php

    r988766 r998103  
    144144    }
    145145   
     146    protected function references()
     147    {
     148        return <<<EOD
     149       
     150        <a href='http://codex.wordpress.org/Determining_Plugin_and_Content_Directories'>Codex: Determining Plugin and Content Directories</a>
     151EOD;
     152    }
    146153}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_WpGenerator.php

    r988766 r998103  
    129129        return 'Intermediate';
    130130    }   
     131
     132    protected function references()
     133    {
     134        return <<<EOD
     135           
     136        <a href='http://kovshenin.com/2013/dont-hide-the-fact-that-youre-using-wordpress/'>Konstantin Kovshenin: Don’t Hide the Fact That You’re Using WordPress</a><br>
     137        <a href='http://plugins.twinpictures.de/wordpress-jquery-versions/'>Twinpictures: A History of jQuery Versions Included in WordPress</a><br>
     138        <a href='http://www.virendrachandak.com/techtalk/how-to-remove-wordpress-version-parameter-from-js-and-css-files/'>Virendra Chandak: How To Remove WordPress Version Parameter From JS and CSS Files</a><br>
     139
     140EOD;
     141    }
    131142   
    132143}
  • gauntlet-security/tags/1.1.0/admin/includes/classes/gus_WpVersion.php

    r988766 r998103  
    110110    }
    111111   
     112    protected function references()
     113    {
     114        return <<<EOD
     115           
     116        <a href='http://codex.wordpress.org/Updating_WordPress'>Codex: Updating WordPress</a><br>
     117
     118EOD;
     119    }
     120   
    112121
    113122}
  • gauntlet-security/tags/1.1.0/gauntlet-security.php

    r990695 r998103  
    77 * Author: Cornelius Bergen, Matchbox Creative
    88 * Author URI: http://matchboxcreative.com
    9  * Version: 1.0.1
     9 * Version: 1.1.0
    1010 * Text Domain: gauntlet
    1111 */
  • gauntlet-security/trunk/README.txt

    r990695 r998103  
    55Requires at least: 3.4
    66Tested up to: 4.0
    7 Stable tag: 1.0.1
     7Stable tag: 1.1.0
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1010
    11 Performs a detailed security analysis of your WordPress installation. Gives tips on how to make your site more secure.
     11Performs a detailed security analysis of your WordPress installation. Suggests ways to make your site more secure.
    1212
    1313== Description ==
     
    2424* Block files in the includes directory
    2525* Rename or move the content directory
     26* Make sure your server is not vulnerable to the Shellshock Bash bug
    2627* Disable dangerous PHP functions
    2728* Disable allow_url_include and allow_url_fopen PHP flags
     
    4445* Users should not display their login usernames publicly
    4546* Prevent username enumeration through standard author URLs
    46 * ...more tests are planned
     47* ...more tests planned
    4748
    4849Check the [screenshots](screenshots) tab above for more detail on some of the above features.
     
    9899== Changelog ==
    99100
     101= 1.1.0 =
     102* New test: Check for Shellshock bug
     103* Enhancement: Add reference links to many tests for more information
     104* Enhancement: Improve PHP display errors check
     105* Enhancement: Improve TimThumb check
     106
    100107= 1.0.1 =
    101108* Fix: TimThumb test
  • gauntlet-security/trunk/admin/assets/js/admin.js

    r988766 r998103  
    1818            */
    1919            var tests = [
    20                 ['gus_FilePermissions', 'slow'],
    21                 ['gus_DirectoryIndexing', 2],
    22                 ['gus_ExecutableUploads', 2],
    23                 ['gus_SecureIncludes', 2],
    24                 ['gus_WpContentLocation', 2],
    25                 ['gus_PhpFunctions', 2],
    26                 ['gus_PhpAllowUrl', 2],
    27                 ['gus_DbPassword', 2],
    28                 ['gus_WpTable', 2],
    29                 ['gus_WpVersion', 2],
    30                 ['gus_PhpDisplayErrors', 2],
    31                 ['gus_FileEditing', 2],
    32                 ['gus_KeysAndSalts', 2],
    33                 ['gus_WpGenerator', 2],
    34                 ['gus_AnyoneCanRegister', 2],
    35                 ['gus_SslAdmin', 2],
    36                 ['gus_PluginAudit', 'slow'],
    37                 ['gus_UnusedThemes', 2],
    38                 ['gus_BmuhtMit', 'slow'],
    39                 ['gus_AdminUsername', 2],
    40                 ['gus_CommonPasswords', 'slow'],
    41                 ['gus_UserIdOne', 'slow'],
    42                 ['gus_AdminCount', 'slow'],
    43                 ['gus_NickNames', 'slow'],
    44                 ['gus_UserNames', 'slow']
     20                ['gus_Shellshock', 'slow'],
     21                ['gus_FilePermissions', 'slow'],
     22                ['gus_DirectoryIndexing', 2],
     23                ['gus_ExecutableUploads', 2],
     24                ['gus_SecureIncludes', 2],
     25                ['gus_WpContentLocation', 2],
     26                ['gus_PhpFunctions', 2],
     27                ['gus_PhpAllowUrl', 2],
     28                ['gus_DbPassword', 2],
     29                ['gus_WpTable', 2],
     30                ['gus_WpVersion', 2],
     31                ['gus_PhpDisplayErrors', 2],
     32                ['gus_FileEditing', 2],
     33                ['gus_KeysAndSalts', 2],
     34                ['gus_WpGenerator', 2],
     35                ['gus_AnyoneCanRegister', 2],
     36                ['gus_SslAdmin', 2],
     37                ['gus_PluginAudit', 'slow'],
     38                ['gus_UnusedThemes', 2],
     39                ['gus_BmuhtMit', 'slow'],
     40                ['gus_AdminUsername', 2],
     41                ['gus_CommonPasswords', 'slow'],
     42                ['gus_UserIdOne', 'slow'],
     43                ['gus_AdminCount', 'slow'],
     44                ['gus_NickNames', 'slow'],
     45                ['gus_UserNames', 'slow']
    4546            ];
    4647            var finished_tests = 0;
  • gauntlet-security/trunk/admin/includes/classes/gus_AdminCount.php

    r988766 r998103  
    127127    }
    128128
     129    protected function references()
     130    {
     131        return <<<EOD
     132           
     133        <a href='http://codex.wordpress.org/Brute_Force_Attacks'>Codex: Brute Force Attacks</a><br>
     134
     135EOD;
     136    }
    129137}
  • gauntlet-security/trunk/admin/includes/classes/gus_BmuhtMit.php

    r990695 r998103  
    3636
    3737        $timthumb_keywords = array(
    38             '/timthumb.php',
    39             '/thumb.php',
    40             '/pics.php',
    41             '/image.php',
    42             '/upload.php',
     38            'image',
     39            'img',
     40            'pic',
     41            'thumb',
     42            'tim.php',
     43            'tt.php',
     44            'upload',
    4345        );
    4446       
     
    4850
    4951            $file_part = strtolower(strrchr($path, '/'));
    50             if( in_array ( $file_part, $timthumb_keywords ) )
    51             {
    52                 error_log("checking... " . $path);
    53 
    54                 if( $file_handle = @fopen( $path, 'r' ) )
     52
     53            $suspicious = false;
     54            foreach($timthumb_keywords as $k)
     55            {
     56                if( strpos( $file_part, $k ) !== false )
    5557                {
    56                     $contents = @fread( $file_handle, 1250 ); // just the first few bytes
    57                     @fclose($file_handle);
    58                    
    59                     $this->run_sub_test( array(
    60                         'path' => $path,
    61                         'contents' => $contents,
    62                     ) );
     58                    $suspicious = true;
     59                    break;
    6360                }
     61            }
     62               
     63            if( $suspicious && $file_handle = @fopen( $path, 'r' ) )
     64            {
     65                $contents = @fread( $file_handle, 1250 ); // just the first few bytes
     66                @fclose($file_handle);
     67               
     68                $this->run_sub_test( array(
     69                    'path' => $path,
     70                    'contents' => $contents,
     71                ) );
    6472            }
    6573        }
  • gauntlet-security/trunk/admin/includes/classes/gus_CommonPasswords.php

    r990695 r998103  
    182182        return 'Intermediate';
    183183    }
     184
     185    protected function references()
     186    {
     187        return <<<EOD
     188           
     189        <a href='http://codex.wordpress.org/Brute_Force_Attacks'>Codex: Brute Force Attacks</a><br>
     190
     191EOD;
     192    }
    184193}
  • gauntlet-security/trunk/admin/includes/classes/gus_DirectoryIndexing.php

    r988766 r998103  
    7070    protected function how_to_fix()
    7171    {
     72        $code1 = <<<EOD
     73
     74<IfModule mod_autoindex.c>
     75Options -Indexes
     76</IfModule>
     77
     78EOD;
     79        $code1 = htmlentities(trim($code1));
     80           
    7281        return <<<EOD
    7382           
     
    7786        So to turn off directory indexing site-wide, add this to the .htaccess file in your web root:
    7887       
    79         <code class='prettyprint'>Options -Indexes</code>
     88        <code class='prettyprint'>{$code1}</code>
    8089       
    8190EOD;
     
    8695        return 'Intermediate';
    8796    }
     97   
     98    protected function references()
     99    {
     100        return <<<EOD
     101           
     102    <a href='https://github.com/h5bp/server-configs-apache'>Apache Server Configs: HTML5 Boilerplate</a><br>
     103       
     104EOD;
     105    }
    88106   
    89107}
  • gauntlet-security/trunk/admin/includes/classes/gus_ExecutableUploads.php

    r988766 r998103  
    150150        return "Intermediate";
    151151    }
     152
     153    protected function references()
     154    {
     155        return <<<EOD
     156           
     157        <a href='http://www.askapache.com/htaccess/using-filesmatch-and-files-in-htaccess.html'>Ask Apache: Using FilesMatch and Files in htaccess</a><br>
     158        <a href='http://docstore.mik.ua/orelly/linux/apache/ch05_06.htm'>Apache: The Definitive Guide: 5.6. Order, Allow, and Deny</a><br>
     159EOD;
     160    }
     161   
    152162}
  • gauntlet-security/trunk/admin/includes/classes/gus_FileEditing.php

    r990695 r998103  
    110110        return 'Easy';
    111111    }   
    112    
     112
     113    protected function references()
     114    {
     115        return <<<EOD
     116           
     117        <a href='http://codex.wordpress.org/Hardening_WordPress#Disable_File_Editing'>Codex: Disable File Editing - Hardening WordPress</a><br>
     118
     119EOD;
     120    }
    113121}
  • gauntlet-security/trunk/admin/includes/classes/gus_FilePermissions.php

    r988766 r998103  
    220220        return 'Advanced';
    221221    }
     222   
     223    protected function references()
     224    {
     225        return <<<EOD
     226           
     227            <a href='http://codex.wordpress.org/Hardening_WordPress#File_Permissions'>Codex: File Permissions - Hardening Wordpress</a><br>
     228            <a href='http://codex.wordpress.org/Changing_File_Permissions'>Codex: Changing File Permissions</a>   
     229       
     230EOD;
     231    }
    222232}
  • gauntlet-security/trunk/admin/includes/classes/gus_KeysAndSalts.php

    r988766 r998103  
    149149    }   
    150150   
     151    protected function references()
     152    {
     153        return <<<EOD
     154           
     155        <a href='http://codex.wordpress.org/Editing_wp-config.php#Security_Keys'>Codex: Security Keys - Editing wp-config.php</a><br>
     156
     157EOD;
     158    }
     159   
     160   
    151161}
  • gauntlet-security/trunk/admin/includes/classes/gus_PhpAllowUrl.php

    r988766 r998103  
    129129        $code = <<<EOD
    130130
    131 allow_url_include = Off
    132 allow_url_fopen = Off
     131allow_url_include = 'off'
     132allow_url_fopen = 'off'
    133133
    134134EOD;
     
    164164    }
    165165   
     166    protected function references()
     167    {
     168        return <<<EOD
     169           
     170        <a href='http://codex.wordpress.org/HTTP_API'>Codex: HTTP API</a><br>
     171        <a href='http://php.net/manual/en/features.remote-files.php'>PHP Manual: Using remote files</a><br>
     172
     173EOD;
     174    }
    166175}
  • gauntlet-security/trunk/admin/includes/classes/gus_PhpDisplayErrors.php

    r988766 r998103  
    33class gus_PhpDisplayErrors extends gus_TestBase
    44{
     5    protected $test_table_show = true;
     6    protected $test_table_headers = false;
     7    protected $test_table_fail_only = false;
     8
    59    protected function main_check()
    610    {
    7         if( ! defined( 'WP_DEBUG' ) || WP_DEBUG == false )
    8         {
    9             $this->pass();
    10         }
    11         elseif( defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY == false )
    12         {
    13             $this->pass();
     11        $wp_debug = ( WP_DEBUG ) ? 'true' : 'false' ;
     12        $wp_debug_log = ( WP_DEBUG_LOG ) ? 'true' : 'false' ;
     13        $ini_display_errors = ( ini_get('display_errors') == '1' ) ? 'on' : 'off';
     14       
     15        if ( WP_DEBUG_DISPLAY )
     16        {
     17            $wp_debug_display = 'true';
     18        }
     19        elseif ( null !== WP_DEBUG_DISPLAY )
     20        {
     21            $wp_debug_display = 'false';
    1422        }
    1523        else
    16         {
    17             $this->critical_fail();
    18         }
    19     }
     24        {
     25            $wp_debug_display = 'null';
     26        }
     27
     28        $configs = array(
     29            'WP_DEBUG' => $wp_debug,
     30            'WP_DEBUG_LOG' => $wp_debug_log,
     31            'WP_DEBUG_DISPLAY' => $wp_debug_display,
     32            "ini_set( 'display_errors' )" => $ini_display_errors,
     33        );       
     34
     35        $this->run_sub_test( array(
     36            'config' =>  'WP_DEBUG',
     37            'configs' => $configs,
     38        ) );
     39       
     40        /*
     41            Only display WP_DEBUG_LOG if WP_DEBUG is true
     42        */
     43        if( WP_DEBUG )
     44        {
     45            $this->run_sub_test( array(
     46                'config' =>  "WP_DEBUG_LOG",
     47                'configs' => $configs,
     48            ) );
     49        }
     50
     51        /*
     52            Only display WP_DEBUG_DISPLAY if WP_DEBUG is true
     53        */
     54        if( WP_DEBUG )
     55        {
     56            $this->run_sub_test( array(
     57                'config' =>  "WP_DEBUG_DISPLAY",
     58                'configs' => $configs,
     59            ) );
     60        }
     61
     62        if( (WP_DEBUG && WP_DEBUG_DISPLAY) || (WP_DEBUG && WP_DEBUG_DISPLAY == false) )
     63        {
     64            // No need to run the ini display_errors check
     65        }
     66        else
     67        {
     68            $this->run_sub_test( array(
     69                'config' =>  "ini_set( 'display_errors' )",
     70                'configs' => $configs,
     71            ) );
     72        }
     73
     74    }
     75
     76    protected function sub_test($args)
     77    {
     78        $config = $args['config'];
     79        $configs = $args['configs'];
     80
     81
     82        // Critical Fails...
     83       
     84        // WP_DEBUG         = true      (should be false)
     85        // display_errors   = true      (should be false)     
     86
     87        // WP_DEBUG         = false
     88        // display_errors   = true      (should be false)
     89
     90
     91        // Fails...
     92       
     93        // WP_DEBUG         = true      (should be false)
     94        // display_errors   = false
     95
     96
     97        // Passes...
     98       
     99        // WP_DEBUG         = false
     100        // display_errors   = false
     101
     102
     103
     104
     105        if( $config == 'WP_DEBUG' )
     106        {
     107            if( WP_DEBUG && $configs["ini_set( 'display_errors' )"] == 'on' )
     108            {
     109                $pass = 'critical';
     110            }
     111            elseif( WP_DEBUG && $configs["ini_set( 'display_errors' )"] == 'off' )
     112            {
     113                $pass = 'fail';
     114                $configs['WP_DEBUG'] = "<span class='error'>" . $configs['WP_DEBUG'] . "</span>";
     115            }
     116            else
     117            {
     118                $pass = 'pass';
     119            }
     120        }
     121       
     122        if( $config == 'WP_DEBUG_LOG' )
     123        {
     124            if( $configs['WP_DEBUG_LOG'] == 'true' )
     125            {
     126                $pass = 'fail';
     127                $configs['WP_DEBUG_LOG'] = "<span class='error'>" . $configs['WP_DEBUG_LOG'] . "</span>";
     128            }
     129            else
     130            {
     131                $pass = 'pass';
     132            }
     133        }       
     134       
     135        if( $config == 'WP_DEBUG_DISPLAY' )
     136        {
     137            if( WP_DEBUG && $configs['WP_DEBUG_DISPLAY'] == 'null' && $configs["ini_set( 'display_errors' )"] == 'on' )
     138            {
     139                $pass = 'critical';
     140            }
     141            elseif( WP_DEBUG && $configs['WP_DEBUG_DISPLAY'] == 'true' )
     142            {
     143                $pass = 'critical';
     144            }
     145            else
     146            {
     147                $pass = 'pass';
     148            }
     149        }       
     150       
     151        if( $config == "ini_set( 'display_errors' )" )
     152        {
     153            if( $configs["ini_set( 'display_errors' )"] == 'on' )
     154            {
     155                $pass = 'critical';
     156            }
     157            else
     158            {
     159                $pass = 'pass';
     160            }
     161        }       
     162       
     163        return array(
     164            'pass' => $pass,
     165            'table_columns' => array(
     166                'Config' => $config,
     167                'Value' => $configs[$config],
     168            ),
     169        );
     170       
     171    }
     172
    20173
    21174    public function title()
     
    28181           
    29182            case 'fail':
     183            return 'PHP errors are not being displayed to the user';
     184            break;
     185           
    30186            case 'critical':
    31187            return 'PHP errors are being displayed to the user';
     
    48204           
    49205            case 'fail':
     206            return 'PHP errors are not being displayed to the user, but WP_DEBUG should be false';
     207            break;
     208           
    50209            case 'critical':
    51             return 'PHP errors are being displayed to the user';
     210            return "PHP errors are being displayed to the user";
    52211            break;
    53212        }
     
    66225    protected function how_to_fix()
    67226    {
     227        $code1 = <<<EOD
     228
     229define( 'WP_DEBUG', false );
     230ini_set( 'display_errors', 'off' );
     231
     232EOD;
     233        $code1 = trim($code1);
     234       
    68235        $code2 = <<<EOD
    69236
     
    79246        return <<<EOD
    80247
    81         If you are not doing any debugging on a public site then add this configuration option
    82         in wp-config.php:
    83    
    84         <code class='prettyprint'>define( 'WP_DEBUG', false );</code>
     248        If you are not doing any debugging on a public site then add this to your wp-config.php:
     249   
     250        <code class='prettyprint'>{$code1}</code>
    85251
    86252        If you are temporarily debugging a production site, then use this combination of settings:
     
    100266        return 'Easy';
    101267    }   
     268
     269    protected function references()
     270    {
     271        return <<<EOD
     272           
     273        <a href='http://codex.wordpress.org/Debugging_in_WordPress'>Codex: Debugging in WordPress</a><br>
     274
     275EOD;
     276    }
     277   
    102278}
  • gauntlet-security/trunk/admin/includes/classes/gus_PhpFunctions.php

    r990695 r998103  
    131131    }
    132132
     133    protected function references()
     134    {
     135        return <<<EOD
     136           
     137        <a href='http://stackoverflow.com/a/3697776/3976381'>Stack Overflow: Exploitable PHP functions</a><br>
     138
     139EOD;
     140    }
    133141}
  • gauntlet-security/trunk/admin/includes/classes/gus_PluginAudit.php

    r990695 r998103  
    224224        return 'Easy';
    225225    }
     226   
     227   
     228   
     229    protected function references()
     230    {
     231        return <<<EOD
     232   
     233        <a href='https://wordpress.org/plugins/'>WordPress Plugin Directory</a><br>
     234        <a href='http://web.nvd.nist.gov/view/vuln/search-results?query=wordpress&search_type=all&cves=on'>National Vulnerability Database</a><br>
     235
     236EOD;
     237    }
     238   
    226239
    227240}
  • gauntlet-security/trunk/admin/includes/classes/gus_SecureIncludes.php

    r988766 r998103  
    148148EOD;
    149149    }
    150    
    151     protected function fix_difficulty()
    152     {
    153         return "Intermediate";
    154     }
     150   
     151    protected function fix_difficulty()
     152    {
     153        return "Intermediate";
     154    }
     155   
     156    protected function references()
     157    {
     158        return "<a href='http://codex.wordpress.org/Hardening_WordPress#Securing_wp-includes'>Codex: Securing wp-includes - Hardening Wordpress</a>";
     159    }
    155160}
  • gauntlet-security/trunk/admin/includes/classes/gus_SslAdmin.php

    r988766 r998103  
    125125        <code class="prettyprint">define('FORCE_SSL_ADMIN', true);</code>
    126126       
    127         ...but setting up SSL on your server is not so simple. For more information, start here:
    128         <a target='_blank' href='http://codex.wordpress.org/Administration_Over_SSL'>codex.wordpress.org/Administration_Over_SSL</a>
    129        
     127        ...but setting up SSL on your server is not so simple. (See the reference below more info.)
     128       
    130129EOD;
    131130    }
     
    135134        return 'Advanced';
    136135    }
     136
     137    protected function references()
     138    {
     139        return <<<EOD
     140           
     141        <a href='http://codex.wordpress.org/Administration_Over_SSL'>Codex: Administration Over SSL</a><br>
     142
     143EOD;
     144    }
     145   
    137146   
    138147}
  • gauntlet-security/trunk/admin/includes/classes/gus_TestBase.php

    r988766 r998103  
    7171
    7272            case 'undetermined':
    73                 $this->undetermined();
     73                if($this->pass !== 'critical')
     74                {
     75                    $this->undetermined();
     76                }
    7477            break;
    7578        }
     79       
     80        return $sub_test;
    7681    }
    7782
     
    8186    protected function how_to_fix(){}
    8287    protected function fix_difficulty(){}
     88    protected function references(){}
    8389   
    8490   
     
    238244EOD;
    239245        }
    240        
    241         if( $html = $this->how_to_fix() )
    242         {
    243             if( $difficulty = $this->fix_difficulty() )
    244             {
    245                 $difficulty = "<p><strong>Difficulty:</strong> {$difficulty}</p>\n";
    246             }
    247             else
    248             {
    249                 $difficulty = '';
    250             }
    251            
    252             $this->message .= <<<EOD
    253            
    254             <div class='how_to_fix'>           
    255                 <h3>How can this be fixed?</h3>             
    256                 {$difficulty}       
    257                 {$html}             
    258             </div>
    259 EOD;
    260         }
     246       
     247        if( $html = $this->how_to_fix() )
     248        {
     249            if( $difficulty = $this->fix_difficulty() )
     250            {
     251                $difficulty = "<p><strong>Difficulty:</strong> {$difficulty}</p>\n";
     252            }
     253            else
     254            {
     255                $difficulty = '';
     256            }
     257           
     258            $this->message .= <<<EOD
     259           
     260            <div class='how_to_fix'>           
     261                <h3>How can this be fixed?</h3>               
     262                {$difficulty}       
     263                {$html}               
     264            </div>
     265EOD;
     266        }
     267       
     268        if( $html = $this->references() )
     269        {
     270            $this->message .= <<<EOD
     271           
     272            <div class='recommendations'>
     273                <h3>References</h3>
     274                {$html}
     275            </div>
     276EOD;
     277        }
    261278    }
    262279
  • gauntlet-security/trunk/admin/includes/classes/gus_TestRunner.php

    r988766 r998103  
    1111
    1212        // File access
     13        $this->tests[] = array('gus_Shellshock', 'Files');
    1314        $this->tests[] = array('gus_FilePermissions', 'Files');
    1415        $this->tests[] = array('gus_DirectoryIndexing', 'Files');
  • gauntlet-security/trunk/admin/includes/classes/gus_UserNames.php

    r988766 r998103  
    2929            /*
    3030                Also display the (redirected) permalink for the URL if applicable
    31                     Ex: http://wp-security-plugin:8888/author/user-login
     31                    Ex: http://example.com/author/user-login
    3232            */
    3333            if($response['response']['code'] == 301)
  • gauntlet-security/trunk/admin/includes/classes/gus_WpContentLocation.php

    r988766 r998103  
    144144    }
    145145   
     146    protected function references()
     147    {
     148        return <<<EOD
     149       
     150        <a href='http://codex.wordpress.org/Determining_Plugin_and_Content_Directories'>Codex: Determining Plugin and Content Directories</a>
     151EOD;
     152    }
    146153}
  • gauntlet-security/trunk/admin/includes/classes/gus_WpGenerator.php

    r988766 r998103  
    129129        return 'Intermediate';
    130130    }   
     131
     132    protected function references()
     133    {
     134        return <<<EOD
     135           
     136        <a href='http://kovshenin.com/2013/dont-hide-the-fact-that-youre-using-wordpress/'>Konstantin Kovshenin: Don’t Hide the Fact That You’re Using WordPress</a><br>
     137        <a href='http://plugins.twinpictures.de/wordpress-jquery-versions/'>Twinpictures: A History of jQuery Versions Included in WordPress</a><br>
     138        <a href='http://www.virendrachandak.com/techtalk/how-to-remove-wordpress-version-parameter-from-js-and-css-files/'>Virendra Chandak: How To Remove WordPress Version Parameter From JS and CSS Files</a><br>
     139
     140EOD;
     141    }
    131142   
    132143}
  • gauntlet-security/trunk/admin/includes/classes/gus_WpVersion.php

    r988766 r998103  
    110110    }
    111111   
     112    protected function references()
     113    {
     114        return <<<EOD
     115           
     116        <a href='http://codex.wordpress.org/Updating_WordPress'>Codex: Updating WordPress</a><br>
     117
     118EOD;
     119    }
     120   
    112121
    113122}
  • gauntlet-security/trunk/gauntlet-security.php

    r990695 r998103  
    77 * Author: Cornelius Bergen, Matchbox Creative
    88 * Author URI: http://matchboxcreative.com
    9  * Version: 1.0.1
     9 * Version: 1.1.0
    1010 * Text Domain: gauntlet
    1111 */
Note: See TracChangeset for help on using the changeset viewer.