Improve 2 factor usage

This commit is contained in:
Philipp Holzer 2022-06-25 14:45:33 +02:00
commit 0223c030a9
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
20 changed files with 400 additions and 77 deletions

View file

@ -24,6 +24,7 @@ namespace Friendica\Module\Settings\TwoFactor;
use Friendica\Core\Renderer;
use Friendica\Core\Session;
use Friendica\DI;
use Friendica\Network\HTTPException\FoundException;
use Friendica\Security\TwoFactor\Model\AppSpecificPassword;
use Friendica\Security\TwoFactor\Model\RecoveryCode;
use Friendica\Model\User;
@ -90,7 +91,9 @@ class Index extends BaseSettings
break;
}
} catch (\Exception $e) {
notice(DI::l10n()->t('Wrong Password'));
if (!($e instanceof FoundException)) {
notice(DI::l10n()->t($e->getMessage()));
}
}
}