diff --git a/src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoCredentialTransaction.php b/src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoCredentialTransaction.php index 532fc271f4..f5a52cb90f 100644 --- a/src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoCredentialTransaction.php +++ b/src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoCredentialTransaction.php @@ -27,6 +27,10 @@ final class PhabricatorAuthFactorProviderDuoCredentialTransaction $actor = $this->getActor(); $errors = array(); + if (!$this->isDuoProvider($object)) { + return $errors; + } + $old_value = $this->generateOldValue($object); if ($this->isEmptyTextTransaction($old_value, $xactions)) { $errors[] = $this->newRequiredError( diff --git a/src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoHostnameTransaction.php b/src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoHostnameTransaction.php index ce1838594e..27ae271137 100644 --- a/src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoHostnameTransaction.php +++ b/src/applications/auth/xaction/PhabricatorAuthFactorProviderDuoHostnameTransaction.php @@ -26,6 +26,10 @@ final class PhabricatorAuthFactorProviderDuoHostnameTransaction public function validateTransactions($object, array $xactions) { $errors = array(); + if (!$this->isDuoProvider($object)) { + return $errors; + } + $old_value = $this->generateOldValue($object); if ($this->isEmptyTextTransaction($old_value, $xactions)) { $errors[] = $this->newRequiredError( diff --git a/src/applications/auth/xaction/PhabricatorAuthFactorProviderTransactionType.php b/src/applications/auth/xaction/PhabricatorAuthFactorProviderTransactionType.php index fe17eee545..3f16249e0c 100644 --- a/src/applications/auth/xaction/PhabricatorAuthFactorProviderTransactionType.php +++ b/src/applications/auth/xaction/PhabricatorAuthFactorProviderTransactionType.php @@ -1,4 +1,12 @@ getFactorKey(); + return ($provider->getProviderFactorKey() === $duo_key); + } + +}