|
|
|
|
@ -24,6 +24,7 @@ use OCP\IUserSession;
|
|
|
|
|
use OCP\Session\Exceptions\SessionNotAvailableException;
|
|
|
|
|
use OCP\User\Backend\IPasswordConfirmationBackend;
|
|
|
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
|
use ReflectionAttribute;
|
|
|
|
|
use ReflectionMethod;
|
|
|
|
|
|
|
|
|
|
class PasswordConfirmationMiddleware extends Middleware {
|
|
|
|
|
@ -115,6 +116,7 @@ class PasswordConfirmationMiddleware extends Middleware {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function isPasswordConfirmationStrict(ReflectionMethod $reflectionMethod): bool {
|
|
|
|
|
/** @var ReflectionAttribute<PasswordConfirmationRequired>[] $attributes */
|
|
|
|
|
$attributes = $reflectionMethod->getAttributes(PasswordConfirmationRequired::class);
|
|
|
|
|
return !empty($attributes) && ($attributes[0]->newInstance()->getStrict());
|
|
|
|
|
}
|
|
|
|
|
|