Commit ab292a03 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

Merge branch 'v2.0'

parents 1c44733b ba30d74d
Pipeline #7575 failed with stages
in 18 minutes and 58 seconds
......@@ -30,8 +30,6 @@ sub defaultValues {
'certificateResetByMailCeaAttribute' => 'description',
'certificateResetByMailCertificateAttribute' =>
'userCertificate;binary',
'certificateResetByMailReplyTo' => 'noreply@example.com',
'certificateResetByMailSender' => 'noreply@example.com',
'certificateResetByMailURL' =>
'http://auth.example.com/certificateReset',
'certificateResetByMailValidityDelay' => 0,
......
......@@ -773,14 +773,6 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'default' => 'userCertificate;binary',
'type' => 'text'
},
'certificateResetByMailReplyTo' => {
'default' => 'noreply@example.com',
'type' => 'text'
},
'certificateResetByMailSender' => {
'default' => 'noreply@example.com',
'type' => 'text'
},
'certificateResetByMailStep1Body' => {
'type' => 'longtext'
},
......
......@@ -1480,39 +1480,27 @@ sub attributes {
type => 'text',
default => 'userCertificate;binary',
},
certificateResetByMailStep1Subject => {
type => 'text',
documentation => 'Mail subject for certificate reset email',
},
certificateResetByMailStep1Body => {
type => 'longtext',
documentation => 'Custom Certificate reset mail body',
},
certificateResetByMailStep2Body => {
type => 'longtext',
documentation => 'Custom confirm Certificate reset mail body',
},
certificateResetByMailStep2Subject => {
type => 'text',
documentation => 'Mail subject for reset confirmation',
},
certificateResetByMailStep1Subject => {
type => 'text',
documentation => 'Mail subject for certificate reset email',
certificateResetByMailStep2Body => {
type => 'longtext',
documentation => 'Custom confirm Certificate reset mail body',
},
certificateResetByMailURL => {
type => 'url',
default => 'http://auth.example.com/certificateReset',
documentation => 'URL of certificate reset page',
},
certificateResetByMailSender => {
type => 'text',
default => 'noreply@example.com',
documentation => 'URL of certificate reset page',
},
certificateResetByMailReplyTo => {
type => 'text',
default => 'noreply@example.com',
documentation => 'URL of certificate reset page',
},
certificateResetByMailValidityDelay => {
type => 'int',
default => 0
......
......@@ -676,8 +676,6 @@ sub tree {
title => 'certificateMailContent',
form => 'simpleInputContainer',
nodes => [
'certificateResetByMailSender',
'certificateResetByMailReplyTo',
'certificateResetByMailStep1Subject',
'certificateResetByMailStep1Body',
'certificateResetByMailStep2Subject',
......
......@@ -143,14 +143,12 @@
"categoryName":"اسم الفئة",
"cda":"نطاقات متعددة",
"certificateMailContent":"Certificate mail content",
"certificateResetByMailManagement":"Certificate reset management",
"certificateResetByMailManagement":"Certificate management",
"certificateResetByMailURL":"Reset page URL",
"certificateResetByMailCeaAttribute":"Certificate attibute name",
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
"certificateResetByMailSender":"Mail sender",
"certificateResetByMailReplyTo":"Reply address",
"certificateResetByMailStep1Subject":"Certificate reset mail subject",
"certificateResetByMailStep1Body":"Certificate reset mail content",
"certificateResetByMailStep1Subject":"Reset mail subject",
"certificateResetByMailStep1Body":"Reset mail content",
"certificateResetByMailStep2Subject":"Confirmation mail subject",
"certificateResetByMailStep2Body":"Confirmation mail content",
"certificateResetByMailValidityDelay":"Minimum duration before expiration",
......@@ -459,7 +457,7 @@
"mailCharset":"charset",
"mailConfirmBody":"تأكيد محتوى البريد",
"mailConfirmSubject":"تأكيد عنوان بريد",
"mailContent":"Password reset mail content",
"mailContent":"Password mail content",
"mailFrom":"مرسل البريد",
"mailHeaders":"هيدر البريد",
"mailLDAPFilter":"فلتر البريد",
......
......@@ -143,14 +143,12 @@
"categoryName":"Category name",
"cda":"Mehrere Domains",
"certificateMailContent":"Certificate mail content",
"certificateResetByMailManagement":"Certificate reset management",
"certificateResetByMailManagement":"Certificate management",
"certificateResetByMailURL":"Reset page URL",
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
"certificateResetByMailSender":"Mail sender",
"certificateResetByMailReplyTo":"Reply address",
"certificateResetByMailStep1Subject":"Certificate reset mail subject",
"certificateResetByMailStep1Body":"Certificate reset mail content",
"certificateResetByMailStep1Subject":"Reset mail subject",
"certificateResetByMailStep1Body":"Reset mail content",
"certificateResetByMailStep2Subject":"Confirmation mail subject",
"certificateResetByMailStep2Body":"Confirmation mail content",
"certificateResetByMailValidityDelay":"Minimum duration before expiration",
......@@ -459,7 +457,7 @@
"mailCharset":"Charset",
"mailConfirmBody":"Confirmation mail content",
"mailConfirmSubject":"Confirmation mail subject",
"mailContent":"Password reset mail content",
"mailContent":"Password mail content",
"mailFrom":"Mail sender",
"mailHeaders":"Mail headers",
"mailLDAPFilter":"Mail filter",
......
......@@ -143,14 +143,12 @@
"categoryName":"Category name",
"cda":"Multiple domains",
"certificateMailContent":"Certificate mail content",
"certificateResetByMailManagement":"Certificate reset management",
"certificateResetByMailManagement":"Certificate management",
"certificateResetByMailURL":"Reset page URL",
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
"certificateResetByMailSender":"Mail sender",
"certificateResetByMailReplyTo":"Reply address",
"certificateResetByMailStep1Subject":"Certificate reset mail subject",
"certificateResetByMailStep1Body":"Certificate reset mail content",
"certificateResetByMailStep1Subject":"Reset mail subject",
"certificateResetByMailStep1Body":"Reset mail content",
"certificateResetByMailStep2Subject":"Confirmation mail subject",
"certificateResetByMailStep2Body":"Confirmation mail content",
"certificateResetByMailValidityDelay":"Minimum duration before expiration",
......@@ -459,7 +457,7 @@
"mailCharset":"Charset",
"mailConfirmBody":"Confirmation mail content",
"mailConfirmSubject":"Confirmation mail subject",
"mailContent":"Password reset mail content",
"mailContent":"Password mail content",
"mailFrom":"Mail sender",
"mailHeaders":"Mail headers",
"mailLDAPFilter":"Mail filter",
......
......@@ -143,14 +143,12 @@
"categoryName":"Nom de la catégorie",
"cda":"Domaines multiples",
"certificateMailContent":"Contenu du mail du certificat",
"certificateResetByMailManagement":"Gestion de la réinitialisation des certificats",
"certificateResetByMailManagement":"Gestion des certificats",
"certificateResetByMailURL":"URL de la page de réinitialisation",
"certificateResetByMailCeaAttribute":"Attribut CEA du certificat",
"certificateResetByMailCertificateAttribute":"Nom de l'attribut du certificat",
"certificateResetByMailSender":"Expéditeur",
"certificateResetByMailReplyTo":"Adresse pour la réponse",
"certificateResetByMailStep1Subject":"Sujet du mail",
"certificateResetByMailStep1Body":"Contenu du mail",
"certificateResetByMailStep1Subject":"Sujet du mail de réinitialisation",
"certificateResetByMailStep1Body":"Contenu du mail de réinitialisation",
"certificateResetByMailStep2Subject":"Sujet du mail de confirmation",
"certificateResetByMailStep2Body":"Contenu du mail de confirmation",
"certificateResetByMailValidityDelay":"Durée minimun avant expiration",
......@@ -459,7 +457,7 @@
"mailCharset":"Charset",
"mailConfirmBody":"Contenu du message de confirmation",
"mailConfirmSubject":"Sujet du message de confirmation",
"mailContent":"Contenu du mail de réinitialisation",
"mailContent":"Contenu du mail de mot de passe",
"mailFrom":"Expéditeur du message",
"mailHeaders":"En-têtes du mail",
"mailLDAPFilter":"Filtre mail",
......
......@@ -143,14 +143,12 @@
"categoryName":"Nome della categoria",
"cda":"Domini multipli",
"certificateMailContent":"Certificate mail content",
"certificateResetByMailManagement":"Certificate reset management",
"certificateResetByMailManagement":"Certificate management",
"certificateResetByMailURL":"Reset page URL",
"certificateResetByMailCeaAttribute":"Certificat CEA attribut",
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
"certificateResetByMailSender":"Mail sender",
"certificateResetByMailReplyTo":"Reply address",
"certificateResetByMailStep1Subject":"Certificate reset mail subject",
"certificateResetByMailStep1Body":"Certificate reset mail content",
"certificateResetByMailStep1Subject":"Reset mail subject",
"certificateResetByMailStep1Body":"Reset mail content",
"certificateResetByMailStep2Subject":"Confirmation mail subject",
"certificateResetByMailStep2Body":"Confirmation mail content",
"certificateResetByMailValidityDelay":"Minimum duration before expiration",
......
......@@ -143,14 +143,12 @@
"categoryName":"Kategori ismi",
"cda":"Çoklu alan adları",
"certificateMailContent":"Certificate mail content",
"certificateResetByMailManagement":"Certificate reset management",
"certificateResetByMailManagement":"Certificate management",
"certificateResetByMailURL":"Reset page URL",
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
"certificateResetByMailSender":"Mail sender",
"certificateResetByMailReplyTo":"Reply address",
"certificateResetByMailStep1Subject":"Certificate reset mail subject",
"certificateResetByMailStep1Body":"Certificate reset mail content",
"certificateResetByMailStep1Subject":"Reset mail subject",
"certificateResetByMailStep1Body":"Reset mail content",
"certificateResetByMailStep2Subject":"Confirmation mail subject",
"certificateResetByMailStep2Body":"Confirmation mail content",
"certificateResetByMailValidityDelay":"Minimum duration before expiration",
......
......@@ -143,14 +143,12 @@
"categoryName":"Tên thể loại",
"cda":"Nhiều tên miền",
"certificateMailContent":"Certificate mail content",
"certificateResetByMailManagement":"Certificate reset management",
"certificateResetByMailManagement":"Certificate management",
"certificateResetByMailURL":"Reset page URL",
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
"certificateResetByMailSender":"Mail sender",
"certificateResetByMailReplyTo":"Reply address",
"certificateResetByMailStep1Subject":"Certificate reset mail subject",
"certificateResetByMailStep1Body":"Certificate reset mail content",
"certificateResetByMailStep1Subject":"Reset mail subject",
"certificateResetByMailStep1Body":"Reset mail content",
"certificateResetByMailStep2Subject":"Confirmation mail subject",
"certificateResetByMailStep2Body":"Confirmation mail content",
"certificateResetByMailValidityDelay":"Minimum duration before expiration",
......@@ -459,7 +457,7 @@
"mailCharset":"Charset",
"mailConfirmBody":"Xác nhận nội dung thư",
"mailConfirmSubject":"Xác nhận chủ đề thư",
"mailContent":"Password reset mail content",
"mailContent":"Password mail content",
"mailFrom":"Người gửi thư",
"mailHeaders":"Tiêu đề thư",
"mailLDAPFilter":"Bộ lọc thư",
......
......@@ -143,14 +143,12 @@
"categoryName":"分类名称",
"cda":"Multiple domains",
"certificateMailContent":"Certificate mail content",
"certificateResetByMailManagement":"Certificate reset management",
"certificateResetByMailManagement":"Certificate management",
"certificateResetByMailURL":"Reset page URL",
"certificateResetByMailCeaAttribute":"Certificate CEA attibute",
"certificateResetByMailCertificateAttribute":"Certificate attribute name",
"certificateResetByMailSender":"Mail sender",
"certificateResetByMailReplyTo":"Reply address",
"certificateResetByMailStep1Subject":"Certificate reset mail subject",
"certificateResetByMailStep1Body":"Certificate reset mail content",
"certificateResetByMailStep1Subject":"Reset mail subject",
"certificateResetByMailStep1Body":"Reset mail content",
"certificateResetByMailStep2Subject":"Confirmation mail subject",
"certificateResetByMailStep2Body":"Confirmation mail content",
"certificateResetByMailValidityDelay":"Minimum duration before expiration",
......@@ -459,7 +457,7 @@
"mailCharset":"Charset",
"mailConfirmBody":"Confirmation mail content",
"mailConfirmSubject":"Confirmation mail subject",
"mailContent":"Password reset mail content",
"mailContent":"Password mail content",
"mailFrom":"邮件发送者",
"mailHeaders":"邮件头",
"mailLDAPFilter":"邮件过滤器",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -391,7 +391,7 @@ sub _certificateReset {
# Send mail
unless (
$self->sendmail(
$self->send_mail(
$req->data->{mailAddress}, $subject, $body, $html
)
)
......@@ -568,7 +568,7 @@ sub modifyCertificate {
# Send mail
return PE_MAILERROR
unless $self->sendmail( $req->data->{mailAddress}, $subject, $body,
unless $self->send_mail( $req->data->{mailAddress}, $subject, $body,
$html );
return PE_MAILOK;
......@@ -711,25 +711,11 @@ sub getCertificateSession {
return "";
}
# Use Certificate Update parameter to send mail
sub sendmail {
my ( $self, $mail, $subject, $body, $html ) = @_;
$self->{mailFrom} = $self->conf->{certificateResetByMailSender};
$self->{mailReplyTo} = $self->conf->{certificateResetByMailReplyTo};
return $self->send_mail( $mail, $subject, $body, $html );
}
sub checkCertificateValidity {
my ( $self, $notAfter, $delay ) = @_;
my $dtNow; # now in format DateTime
my $days; # difference between NotAfter and now
my $f = DateTime::Format::RFC3339->new();
my $dtNotAfter = $f->parse_datetime($notAfter);
$self->userLogger->debug("Not After Date: $dtNotAfter");
......@@ -753,7 +739,6 @@ sub checkCertificateValidity {
}
sub certificateHash {
my ( $self, $file ) = @_;
my $cert;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment