| @@ 26-35 (lines=10) @@ | ||
| 23 | /** |
|
| 24 | * @return bool|string |
|
| 25 | */ |
|
| 26 | protected function checkHtAccessProtection() |
|
| 27 | { |
|
| 28 | $file = BASE_PATH . '/.htaccess'; |
|
| 29 | ||
| 30 | if(!is_file($file) || strpos(file_get_contents($file), '<Files supersake>') !== false) { |
|
| 31 | return 'supersake is not protected in .htaccess'; |
|
| 32 | } |
|
| 33 | ||
| 34 | return false; |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @return bool|string |
|
| @@ 40-49 (lines=10) @@ | ||
| 37 | /** |
|
| 38 | * @return bool|string |
|
| 39 | */ |
|
| 40 | protected function checkWebConfigProtection() |
|
| 41 | { |
|
| 42 | $file = BASE_PATH . '/web.config'; |
|
| 43 | ||
| 44 | if(!is_file($file) || strpos(file_get_contents($file), '<add fileExtension="supersake" allowed="false"/>') !== false) { |
|
| 45 | return 'supersake is not protected in web.config'; |
|
| 46 | } |
|
| 47 | ||
| 48 | return false; |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * Check if the web server is IIS and version greater than the given version. |
|