Skip to content

Commit 558881c

Browse files
authored
Merge pull request #34 from igorhrcek/issue-26
Issue 26
2 parents 85c2fdd + 231ca06 commit 558881c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/SecureCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ public function all($args, $assoc_args) : void {
432432
(new BlockAccessToSensitiveDirectories($assoc_args))->output();
433433
(new BlockAuthorScanning($assoc_args))->output();
434434
(new FixFileAndDirPermissions())->output();
435+
(new AddSecurityHeaders($assoc_args))->output();
435436
$this->disable_file_editor($args, $assoc_args);
436437
}
437438
}

src/SubCommands/FixFileAndDirPermissions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ public function output() : bool {
2424
return false;
2525
}
2626

27+
\WP_CLI::confirm( 'This command will change file and folder permissions inside your WordPress installation which might affect the way it works. Are you sure that you want to do this?' );
28+
2729
$iterator = new \RecursiveDirectoryIterator(ABSPATH);
2830
foreach($iterator as $file) {
2931
chmod($file, is_file($file) ? $this->filePermissions : $this->directoryPermissions);
3032
}
3133

32-
WP_CLI::success("Permissions were successfully updated.");
34+
\WP_CLI::success("Permissions were successfully updated.");
3335

3436
return true;
3537
}

0 commit comments

Comments
 (0)