Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the term blacklist, refactor class name #11

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
use Drutiny\Annotation\Param;

/**
* BlackList Permissions
* Excluded Permissions
* @Param(
* name = "permissions",
* description = "An array of permissions to ensure are not available to non-administrator roles",
* description = "An array of permissions to ensure are excluded to non-administrator roles",
* type = "array"
* )
*/
class BlacklistPermissions extends Audit {
class ExcludedPermissions extends Audit {

/**
*
Expand Down
4 changes: 2 additions & 2 deletions src/Audit/User1.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* User #1 Locked Down
* @Param(
* name = "blacklist",
* name = "denylist",
* description = "The usernames of the the uid:1 user that are considered forbidden. Expression maybe a regular expression to match patterns.",
* type = "string"
* )
Expand Down Expand Up @@ -39,7 +39,7 @@ public function audit(Sandbox $sandbox) {
$errors = [];

// Username.
$pattern = $sandbox->getParameter('blacklist');
$pattern = $sandbox->getParameter('denylist');
if (preg_match("#${pattern}#i", $user->name)) {
$errors[] = "Username '$user->name' is too easy to guess.";
}
Expand Down