You are here

public function Security::unsafeExtensions in Security Review 8

Gets the list of unsafe file extensions.

Return value

string[] List of unsafe extensions.

File

src/Security.php, line 295

Class

Security
Provides frequently used security-related data.

Namespace

Drupal\security_review

Code

public function unsafeExtensions() {
  $unsafe_ext = [
    'swf',
    'exe',
    'html',
    'htm',
    'php',
    'phtml',
    'py',
    'js',
    'vb',
    'vbe',
    'vbs',
  ];

  // Alter data.
  $this->moduleHandler
    ->alter('security_review_unsafe_extensions', $unsafe_ext);
  return $unsafe_ext;
}