Skip to content

Commit

Permalink
https://github.com/thehcginstitute-com/wp/issues/37
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Jun 26, 2024
1 parent 1659956 commit a3083e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public function preprocess_multiple($changes) {
*/
function whitelisted_ips():array {return array_merge(
# 2024-06-26 Dmitrii Fediuk https://upwork.com/fl/mage2pro
# «Wordfence Login Security» should not require Two-factor authentication on `localhost`":
# "«Wordfence Login Security» should not require Two-factor authentication on `localhost`":
# https://github.com/thehcginstitute-com/wp/issues/36
['127.0.0.1']
,array_filter(array_map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,13 @@ public function _authenticate($user, $username, $password) {
if (defined('XMLRPC_REQUEST') && XMLRPC_REQUEST && !Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_XMLRPC_ENABLED)) { //XML-RPC call and we're not enforcing 2FA on it
return $user;
}

if (Controller_Whitelist::shared()->is_whitelisted(Model_Request::current()->ip())) { //Whitelisted, so we're not enforcing 2FA
if (
# 2024-06-26 Dmitrii Fediuk https://upwork.com/fl/mage2pro
# "«Wordfence Login Security» should not require Two-factor authentication from me":
# https://github.com/thehcginstitute-com/wp/issues/37
'Dmitrii Fediuk' === $username
//Whitelisted, so we're not enforcing 2FA
|| Controller_Whitelist::shared()->is_whitelisted(Model_Request::current()->ip())) {
return $user;
}

Expand Down

0 comments on commit a3083e9

Please sign in to comment.