Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Mar 4, 2024
1 parent 0c7b11d commit ae8ae14
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ These adjustments led to some breaking changes, therefore during update it is re
* PHP 8.0 is supported [#104](https://github.com/chesio/bc-security/issues/104).
* Alert about "No removed plugins installed" has more information [#107](https://github.com/chesio/bc-security/issues/107).
* Detection of plugins installed from WordPress Directory has been improved [#112](https://github.com/chesio/bc-security/issues/112).
* On WordPress 5.8 and newer the plugin cannot be accidentally overriden from WordPress.org Plugins Directory [#111](https://github.com/chesio/bc-security/issues/111).
* On WordPress 5.8 and newer the plugin cannot be accidentally overridden from WordPress.org Plugins Directory [#111](https://github.com/chesio/bc-security/issues/111).

## Older releases

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ You may also optionally provide Google API key if you want to check your website

BC Security can help you find potential security issues or even signs of breach.

Since security measures for development instalations do not have to be as strict as for live installations, some checks are run only in *live environment*. A *live environment* is determined as one where [`wp_get_environment_type()`](https://developer.wordpress.org/reference/functions/wp_get_environment_type/) returns either `production` or `staging`, but there is a [dedicated filter](#customization) that can be used to override *live environment* detection.
Since security measures for development installations do not have to be as strict as for live installations, some checks are run only in *live environment*. A *live environment* is determined as one where [`wp_get_environment_type()`](https://developer.wordpress.org/reference/functions/wp_get_environment_type/) returns either `production` or `staging`, but there is a [dedicated filter](#customization) that can be used to override *live environment* detection.

#### Basic checks

Expand Down
2 changes: 1 addition & 1 deletion classes/BlueChip/Security/Helpers/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ abstract class FormHelper
* name and empty (false-like) value is printed before checkbox - this way,
* POST data contains value for checkbox even if it is left unchecked.
* Note that this approach works thanks to the fact that PHP retains value
* of the last key occurence in POST data when there are multiple occurences
* of the last key occurrence in POST data when there are multiple occurrences
* of the same key (name); when checkbox is checked (and included in POST),
* its value overwrites hidden field value.
* See: http://stackoverflow.com/a/1992745
Expand Down
8 changes: 4 additions & 4 deletions classes/BlueChip/Security/Modules/Hardening/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Core implements Initializable
private const PWNED_PASSWORD_META_KEY = 'bc-security/pwned-password';


private bool $rest_api_supressed = false;
private bool $rest_api_suppressed = false;


public function __construct(private Settings $settings)
Expand Down Expand Up @@ -158,7 +158,7 @@ public function getUrlBase(): string
)->getUrlBase();

if (\preg_match('#' . \preg_quote($url_base, '#') . '/*$#i', $route)) {
$this->rest_api_supressed = true;
$this->rest_api_suppressed = true;
return rest_ensure_response(new WP_Error(
'rest_user_cannot_view',
__('Sorry, you are not allowed to list users.'), // WP core message
Expand All @@ -169,7 +169,7 @@ public function getUrlBase(): string
$matches = [];
if (\preg_match('#' . \preg_quote($url_base, '#') . '/+(\d+)/*$#i', $route, $matches)) {
if (get_current_user_id() !== (int) $matches[1]) {
$this->rest_api_supressed = true;
$this->rest_api_suppressed = true;
return rest_ensure_response(new WP_Error(
'rest_user_invalid_id',
__('Invalid user ID.'), // WP core message.
Expand All @@ -192,7 +192,7 @@ public function getUrlBase(): string
*/
public function adjustJsonAPIHeaders(\WP_HTTP_Response $response): \WP_HTTP_Response
{
if ($this->rest_api_supressed) {
if ($this->rest_api_suppressed) {
$response->header('Allow', 'GET');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public function unlockMany(array $ids): int
}
// Prepare query.
$query = \sprintf(
"UDPATE {$this->blocklist_table} SET release_time = '%s' WHERE %s",
"UPDATE {$this->blocklist_table} SET release_time = '%s' WHERE %s",
MySQLDateTime::formatDateTime(\time()),
\implode(' OR ', \array_map(fn (int $id): string => \sprintf('id = %d', $id), $ids))
);
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/src/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public function setUp(): void
*/
protected function prepareTest(): void
{
// Empty by default, can be overriden in descendants.
// Empty by default, can be overridden in descendants.
}
}

0 comments on commit ae8ae14

Please sign in to comment.