Validation fails
This commit is contained in:
@@ -13,6 +13,7 @@ framework:
|
|||||||
cookie_secure: auto
|
cookie_secure: auto
|
||||||
cookie_samesite: lax
|
cookie_samesite: lax
|
||||||
storage_factory_id: session.storage.factory.native
|
storage_factory_id: session.storage.factory.native
|
||||||
|
save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
|
||||||
|
|
||||||
#esi: true
|
#esi: true
|
||||||
#fragments: true
|
#fragments: true
|
||||||
|
|||||||
@@ -9,4 +9,6 @@ opcache.validate_timestamps=1
|
|||||||
opcache.revalidate_freq=0
|
opcache.revalidate_freq=0
|
||||||
|
|
||||||
log_errors=On
|
log_errors=On
|
||||||
error_log=/var/www/html/var/log/error_log.log
|
error_log=/var/www/html/var/log/errorlog_php.txt
|
||||||
|
session.gc_maxlifetime=1440
|
||||||
|
session.cookie_lifetime=0
|
||||||
|
|||||||
@@ -1,9 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Kernel;
|
use App\Kernel;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||||
|
|
||||||
return function (array $context) {
|
return function (array $context) {
|
||||||
|
if ($trustedProxies = $context['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
|
||||||
|
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($trustedHosts = $context['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
|
||||||
|
Request::setTrustedHosts([$trustedHosts]);
|
||||||
|
}
|
||||||
|
|
||||||
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,15 +26,13 @@ class ChangePasswordFormType extends AbstractType
|
|||||||
],
|
],
|
||||||
'first_options' => [
|
'first_options' => [
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new NotBlank([
|
new NotBlank(message: 'Please enter a password'),
|
||||||
'message' => 'Please enter a password',
|
new Length(
|
||||||
]),
|
min: 12,
|
||||||
new Length([
|
minMessage: 'Your password should be at least {{ limit }} characters',
|
||||||
'min' => 12,
|
|
||||||
'minMessage' => 'Your password should be at least {{ limit }} characters',
|
|
||||||
// max length allowed by Symfony for security reasons
|
// max length allowed by Symfony for security reasons
|
||||||
'max' => 4096,
|
max: 4096,
|
||||||
]),
|
),
|
||||||
new PasswordStrength(),
|
new PasswordStrength(),
|
||||||
new NotCompromisedPassword(),
|
new NotCompromisedPassword(),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -21,9 +21,7 @@ class RegistrationFormType extends AbstractType
|
|||||||
->add('email', EmailType::class)
|
->add('email', EmailType::class)
|
||||||
->add('username', TextType::class, [
|
->add('username', TextType::class, [
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new NotBlank([
|
new NotBlank(message: 'Please enter a username'),
|
||||||
'message' => 'Please enter a username',
|
|
||||||
]),
|
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
->add('plainPassword', RepeatedType::class, [
|
->add('plainPassword', RepeatedType::class, [
|
||||||
@@ -33,15 +31,13 @@ class RegistrationFormType extends AbstractType
|
|||||||
'first_options' => ['label' => 'Password'],
|
'first_options' => ['label' => 'Password'],
|
||||||
'second_options' => ['label' => 'Repeat Password'],
|
'second_options' => ['label' => 'Repeat Password'],
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new NotBlank([
|
new NotBlank(message: 'Please enter a password'),
|
||||||
'message' => 'Please enter a password',
|
new Length(
|
||||||
]),
|
min: 6,
|
||||||
new Length([
|
minMessage: 'Your password should be at least {{ limit }} characters',
|
||||||
'min' => 6,
|
|
||||||
'minMessage' => 'Your password should be at least {{ limit }} characters',
|
|
||||||
// max length allowed by Symfony for security reasons
|
// max length allowed by Symfony for security reasons
|
||||||
'max' => 4096,
|
max: 4096,
|
||||||
]),
|
),
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ class ResetPasswordRequestFormType extends AbstractType
|
|||||||
->add('email', EmailType::class, [
|
->add('email', EmailType::class, [
|
||||||
'attr' => ['autocomplete' => 'email'],
|
'attr' => ['autocomplete' => 'email'],
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new NotBlank([
|
new NotBlank(message: 'Please enter your email'),
|
||||||
'message' => 'Please enter your email',
|
|
||||||
]),
|
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user