Skip to content

Commit

Permalink
Merge branch 'sympa-6.2' into issue-867
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedas authored Feb 14, 2020
2 parents 6020609 + dced686 commit ef6ffef
Show file tree
Hide file tree
Showing 96 changed files with 21,549 additions and 20,792 deletions.
7 changes: 5 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
- . ~/bashrc
- coverage-install
- coverage-setup
- cpanm --quiet --notest --installdeps . --with-develop
- cpanm --quiet --notest --installdeps --with-develop --with-feature=ldap --with-feature=safe-unicode --with-feature=soap --with-feature=sqlite .
- cpanm --notest --quiet Unicode::CaseFold
- autoreconf -i
- ./configure
- cd src; make; cd ..
- make check-local TEST_FILES='xt/perltidy.t' || true
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/Message_smime.t t/compile_scenarios.t t/parse_templates.t t/pod-syntax.t'
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/Message.t t/Message_smime.t t/compile_scenarios.t t/parse_templates.t t/pod-syntax.t'
- coverage-report
- make clean

Expand All @@ -38,3 +39,5 @@
<<: *job
"5.28":
<<: *job
"5.30":
<<: *job
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ before_install:

install:
- cpan-install --coverage
- cpanm --installdeps --notest --with-develop --with-feature=soap --with-feature=ldap .
- cpanm --installdeps --notest --with-develop --with-feature=ldap --with-feature=safe-unicode --with-feature=soap --with-feature=sqlite .
- cpanm --notest --quiet Unicode::CaseFold

before_script:
Expand All @@ -39,7 +39,7 @@ script:
- ./configure
- cd src; make; cd ..
- make check-local TEST_FILES='xt/perltidy.t' || true
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/Message_smime.t t/compile_scenarios.t t/parse_templates.t t/pod-syntax.t'
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/Message.t t/Message_smime.t t/compile_scenarios.t t/parse_templates.t t/pod-syntax.t'

after_success:
- coverage-report
Expand Down
10 changes: 10 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ check_SCRIPTS = \
t/02_Sympa_DatabaseManager.t \
t/Language.t \
t/LockedFile.t \
t/Message.t \
t/Message_smime.t \
t/Regexps.t \
t/compile_modules.t \
Expand All @@ -56,7 +57,16 @@ check_DATA = \
t/pki/key/ca.pem \
t/pki/key/rousse_nopassword.pem \
t/pki/key/rousse_password.pem \
t/samples/urlize-deep-nested-mixed.eml \
t/samples/urlize-encoding.eml \
t/samples/urlize-nested-alternative-and-related.eml \
t/samples/urlize-nested-alternative.eml \
t/samples/urlize-nested-mixed.eml \
t/samples/urlize-nested-mutiple-attachments.eml \
t/samples/urlize-simple-mutiple-attachments.eml \
t/samples/urlize-simple.eml \
t/stub/Sympa/Constants.pm \
t/data/list_data/test/config \
t/data/sympa.conf \
t/data/sympa.sqlite \
t/data/etc/auth.conf \
Expand Down
9 changes: 6 additions & 3 deletions cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,11 @@ recommends 'Net::SMTP';

# Normalizes file names represented by Unicode
# Note: Perl 5.8.1 bundles version 0.23.
# Note: Perl 5.10.1 bundles this version (per Unicode 5.1.0).
# Note: Perl 5.10.1 bundles 1.03 (per Unicode 5.1.0).
recommends 'Unicode::Normalize', '>= 1.03';

recommends 'Unicode::UTF8', '>= 0.58';

### Features
##

Expand Down Expand Up @@ -296,10 +298,11 @@ feature 'soap', 'Required if you want to run the Sympa SOAP server that provides
requires 'SOAP::Lite', '>= 0.712';
};

feature 'Unicode::Normalize', 'Normalizes file names represented by Unicode.' => sub {
feature 'safe-unicode', 'Sanitises inputs with Unicode text.' => sub {
# Note: Perl 5.8.1 bundles version 0.23.
# Note: Perl 5.10.1 bundles this version (per Unicode 5.1.0).
# Note: Perl 5.10.1 bundles 1.03 (per Unicode 5.1.0).
requires 'Unicode::Normalize', '>= 1.03';
requires 'Unicode::UTF8', '>= 0.58';
};

on 'test' => sub {
Expand Down
4 changes: 2 additions & 2 deletions default/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ nobase_default_DATA = \
scenari/d_read.private \
scenari/d_read.private-https \
scenari/d_read.public \
scenari/family_signoff.auth \
scenari/family_signoff.closed \
scenari/global_remind.listmaster \
scenari/info.open \
scenari/info.private \
Expand Down Expand Up @@ -216,8 +218,6 @@ nobase_default_DATA = \
web_tt2/editsubscriber.tt2 \
web_tt2/edit_template.tt2 \
web_tt2/error.tt2 \
web_tt2/family_signoff.tt2 \
web_tt2/family_signoff_request.tt2 \
web_tt2/footer.tt2 \
web_tt2/get_closed_lists.tt2 \
web_tt2/get_inactive_lists.tt2 \
Expand Down
4 changes: 2 additions & 2 deletions default/mail_tt2/listmaster_notification.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Subject: [%"List \"%1@%2\" creation request from %3"|loc(list.name,domain,email)
[% 'info' | url_abs([list.name]) %]

[%|loc%]To activate/delete this mailing list:[%END%]
[% 'ticket' | url_abs([one_time_ticket]) %]
[% 'get_pending_lists' | url_abs %]

[%- ELSIF type == 'list_created' -%]
[% PROCESS 'list_created.tt2' -%]
Expand All @@ -30,7 +30,7 @@ Subject: [%"List \"%1\" renaming"|loc(list.name)|qencode%]
[% END %]

[%|loc%]To activate/delete this mailing list:[%END%]
[% 'ticket' | url_abs([one_time_ticket]) %]
[% 'get_pending_lists' | url_abs %]

[% ELSIF type == 'no_db' -%]
Subject: [%"No database"|loc|qencode%]
Expand Down
2 changes: 1 addition & 1 deletion default/mail_tt2/listowner_notification.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Subject: [%"FYI: %1 List \"%2\" from %3 %4"|loc(type,list.name,who,gecos)|qencod
[%|loc(who,gecos,list.name)%]WARNING: %1 %2 failed to unsubscribe from %3 because their address was not found in the list.
You may help this person looking for similar email in subscriber list using the following link :[%END%]

[% 'ticket' | url_abs([one_time_ticket]) %]
[% 'search' | url_abs([list.name,who]) %]

[% ELSIF type == 'erase_customizing' -%]
Subject: [%"List \"%1\" customizations have been removed"|loc(list.name)|qencode%]
Expand Down
2 changes: 1 addition & 1 deletion default/mail_tt2/moderate.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Content-Disposition: inline

[% IF method == 'md5' -%]
[%|loc(mod_spool_size)%]%1 messages are awaiting moderation.[%END%]
[%|loc%]To view the messages, please click on the following URL:[%END%] <[% 'ticket' | url_abs([one_time_ticket]) %]>
[%|loc%]To view the messages, please click on the following URL:[%END%] <[% 'modindex' | url_abs([list.name]) %]>

[% IF request_topic -%][%|loc()%]This mailing list is configured to require topics; that's probably why this message went through the moderation process.[%END%]

Expand Down
9 changes: 7 additions & 2 deletions default/mail_tt2/request_auth.tt2
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
[%# request_auth.tt2 ~%]
To: [% to %]
[% IF conf.wwsympa_url && type == 'signoff' -%]
[% IF conf.wwsympa_url && type == 'family_signoff' -%]
Subject: [%"%1 / unsubscribing from family %2"|loc(conf.title,family.name)|qencode%]
[%- ELSIF conf.wwsympa_url && type == 'signoff' -%]
Subject: [%"%1 / unsubscribing from %2"|loc(conf.title,list.name)|qencode%]
[%- ELSIF conf.wwsympa_url && type == 'subscribe' -%]
Subject: [%"%1 / subscribing to %2"|loc(conf.title,list.name)|qencode%]
[%- ELSE -%]
Subject: [%"AUTH ${keyauth} ${cmd}"|qencode%]
[%- END %]

[% IF type == 'signoff' -%]
[% IF type == 'family_signoff' -%]
[%|loc(family.name)-%]You requested that your e-mail address be removed from family '%1'.[%- END -%]

[%- ELSIF type == 'signoff' -%]
[%|loc(list.name)-%]You requested that your e-mail address be removed from list '%1'.[%- END -%]

[%- ELSIF type == 'subscribe' -%]
Expand Down
11 changes: 0 additions & 11 deletions default/mail_tt2/user_notification.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ Subject: [%"Management of list %1"|loc(list.name)|qencode%]
[%|loc%]Owner and moderator guide:[%END%] [% 'help' | url_abs(['admin.html']) %]
[% END -%]

[% ELSIF type == 'ticket_to_family_signoff' -%]
Subject: [%"Unsubscribing from family %1"|loc(family)|qencode%]
[% IF context == 'family_signoff'%]
[%|loc(family,ip)%]Somebody (probably you) requested to unsubscribe you from family %1. This query was issued from the IP address %2.
To confirm and be removed from all the lists of this family, please click the link below: [%END%]
[% ELSE %]
[%|loc(family)%]You have requested to be removed from family %1. To confirm and be removed from all the lists of this family, please click the link below: [%END%]
[% END %]
[% 'ticket' | url_abs([one_time_ticket]) %]


[% ELSIF type == 'hundred_percent_error' -%]
Subject: [%"No valid recipient in list %1"|loc(list.name)|qencode%]

Expand Down
6 changes: 6 additions & 0 deletions default/scenari/family_signoff.auth
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# family_signoff.auth
title.gettext need authentication

!equal([sender],[email]) smtp,dkim,md5,smime -> request_auth([email])
true() smtp,dkim -> request_auth([email])
true() md5,smime -> do_it
4 changes: 4 additions & 0 deletions default/scenari/family_signoff.closed
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# family_signoff.closed
title.gettext impossible

true() smtp,dkim,md5,smime -> reject(reason='unsub_closed')
18 changes: 18 additions & 0 deletions default/web_tt2/confirm_action.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
[%|loc%]Add subscribers[%END%]
[%~ ELSIF heldaction == 'del' ~%]
[%|loc%]Delete selected email addresses[%END%]
[%~ ELSIF heldaction == 'family_signoff' ~%]
[%|loc%]Global unsubscription[%END%]
[%~ ELSIF heldaction == 'move_user' ~%]
[%|loc%]Changing user's email[%END%]
[%~ ELSIF heldaction == 'remind' || heldaction == 'global_remind' ~%]
Expand Down Expand Up @@ -217,6 +219,16 @@
[%|loc(shared_doc.name)%]Do you really want to delete %1?[%END%]
</strong>
</p>
[%~ ELSIF confirm_action == 'family_signoff' ~%]
<h2>
<i class="fa fa-check-circle"></i>
[%|loc%]Global unsubscription[%END%]
</h2>
<p>
<strong>
[%|loc(family)%]Do you really want to unsubscribe from the lists in family %1?[%END%]
</strong>
</p>
[%~ ELSIF confirm_action == 'move_list' ~%]
<h2>
<i class="fa fa-check-circle"></i>
Expand Down Expand Up @@ -387,6 +399,9 @@
<input type="hidden" name="heldaction" value="[% heldaction %]" />
<input type="hidden" name="listname" value="[% listname %]" />
<input type="hidden" name="email" value="[% email %]" />
[% IF heldaction == 'family_signoff' ~%]
<input type="hidden" name="family" value="[% family %]" />
[%~ END %]
[%~ ELSIF confirm_action == 'auth_add' ~%]
[% FOREACH i = id ~%]
<input type="hidden" name="id" value="[% i %]" />
Expand Down Expand Up @@ -453,6 +468,8 @@
<input type="hidden" name="d_admin" value="[% d_admin %]" />
[%~ ELSIF confirm_action == 'd_delete' ~%]
<input type="hidden" name="path" value="[% shared_doc.paths.join("/") %]" />
[%~ ELSIF confirm_action == 'family_signoff' ~%]
<input type="hidden" name="email" value="[% email %]" />
[%~ ELSIF confirm_action == 'move_user' ~%]
<input type="hidden" name="current_email" value="[% current_email %]" />
<input type="hidden" name="email" value="[% email %]" />
Expand Down Expand Up @@ -507,6 +524,7 @@
# Confirmation common hidden fields
#%]
<input type="hidden" name="action" value="[% confirm_action %]" />
<input type="hidden" name="family" value="[% family %]" />
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="previous_action" value="[% previous_action %]" />

Expand Down
6 changes: 0 additions & 6 deletions default/web_tt2/family_signoff.tt2

This file was deleted.

9 changes: 0 additions & 9 deletions default/web_tt2/family_signoff_request.tt2

This file was deleted.

6 changes: 0 additions & 6 deletions default/web_tt2/family_signoff_request2.tt2

This file was deleted.

20 changes: 10 additions & 10 deletions doc/sympa_scenario.pod
Original file line number Diff line number Diff line change
Expand Up @@ -180,22 +180,22 @@ Default value is "nobody".
=item C<[topic]>

Topic of the message.
This variable has a value if any of the previous
C<[topic-*]> variable has a value.
This variable has a value if any of the following
C<[topic_*]> variables has a value.

=item C<[topic-auto]>
=item C<[topic_auto]>

Topic of the message if it has been automatically tagged.

=item C<[topic-editor]>
=item C<[topic_editor]>

Topic of the message if it has been tagged by editor.

=item C<[topic-needed]>
=item C<[topic_needed]>

The message has not got any topic and message topic are required for the list.

=item C<[topic-sender]>
=item C<[topic_sender]>

Topic of the message if it has been tagged by sender.

Expand Down Expand Up @@ -349,10 +349,10 @@ var : "[email]"
| "[sender]"
| "[subscriber->" subscriber_key_word "]"
| "[topic]"
| "[topic-auto]"
| "[topic-editor]"
| "[topic-needed]"
| "[topic-sender]"
| "[topic_auto]"
| "[topic_editor]"
| "[topic_needed]"
| "[topic_sender]"
| "[user->" user_key_word "]"
| "[user_attributes->" user_attributes_keyword "]"
| string
Expand Down
Loading

0 comments on commit ef6ffef

Please sign in to comment.