Commit Graph

312 Commits

Author SHA1 Message Date
pfm 750014e588 Merge pull request 'Add identity table' (#11) from identity-table into main
Reviewed-on: #11
2023-12-02 18:56:00 +00:00
Piotr F. Mieszkowski ca8bda5a83 Update README: link to backend repository, reformat instructions 2023-12-02 18:55:41 +01:00
Piotr F. Mieszkowski ce20926ce6 Rename project from gpg-mailgate to lacre 2023-12-02 18:53:28 +01:00
Piotr F. Mieszkowski fe92f6c081 Change table prefix from 'gpgmw' to 'lacre', part 2 2023-12-02 17:56:07 +01:00
Piotr F. Mieszkowski a564da49f2 Change table prefix from 'gpgmw' to 'lacre' 2023-12-02 17:53:56 +01:00
Piotr F. Mieszkowski e2e81288a1 Rename README to README.md 2023-11-26 12:04:19 +01:00
Piotr F. Mieszkowski 8b3dc4555d Add identity table 2023-11-26 10:31:08 +01:00
muppeth 6fecb95182 Merge pull request '0.2' (#10) from 0.2 into main
Reviewed-on: #10
2023-09-02 18:29:53 +00:00
muppeth e711b24de7
remove test disroot theme; 2023-09-01 19:05:40 +02:00
muppeth 197152b807
add all to theme gitignore 2023-09-01 19:04:41 +02:00
muppeth db45dbc1ae
using info template for confirm page 2023-09-01 16:31:36 +02:00
muppeth 2b5642a66b
as discussed in https://git.disroot.org/Lacre/lacre-webgate 2023-08-19 09:43:02 +02:00
muppeth dac5087f22
fixed missing last changes in lacre theme 2023-08-17 09:37:14 +02:00
muppeth 90b07d381f
fixed missing last changes in lacre theme 2023-08-17 09:33:51 +02:00
muppeth 3abfad3b06
added possibility to change themes 2023-08-16 10:01:54 +02:00
muppeth 6622c46f1a added menu with links to top of the page; some improvements to css
Signed-off-by: muppeth <muppeth@disroot.org>
2023-08-14 17:40:34 +02:00
muppeth eef76f4e86
added info template;split out result message to seperate page to avoid confusion; 2023-04-13 01:19:54 +02:00
muppeth 302c7a7107
added info template;split out result message to seperate page to avoid confusion; 2023-04-13 01:12:44 +02:00
muppeth 629b99a017 Merge pull request 'Uncouple Frontend from Backend' (#1) from uncoupleFE into main
Reviewed-on: Lacre/lacre-web#1
2022-10-11 14:22:44 +00:00
muppeth e2207b7487
uncouple FE from BE repos;initial improvements to frontend(FE); 2022-10-11 16:20:58 +02:00
muppeth 4d346f723c initial 2022-10-11 16:18:38 +02:00
antilopa 603cc3ab79 unify theme with website and form input fixes 2022-08-20 12:35:30 +02:00
muppeth d77f03bb85
initial changes to the web frontend 2022-08-20 12:06:26 +02:00
pfm 002e150805 Merge pull request 'Move core logic from gpg-mailgate.py to lacre.mailgate module' (#91) from 90-core-module into master
Reviewed-on: Disroot/gpg-lacre#91
2022-06-11 19:10:36 +00:00
Piotr F. Mieszkowski 5ffbbec5f0 Rename sort_recipients to deliver_message, remove unused imports 2022-06-11 21:05:27 +02:00
Piotr F. Mieszkowski b627fde510 Move gpg-mailgate.py logic to lacre.mailgate module
gpg-mailgate.py script keeps its role, but only needs to call code defined in
lacre.mailgate.
2022-06-11 21:00:42 +02:00
pfm 8a366f2f17 Merge pull request 'Handle addresses with delimiters' (#89) from 87-handle-delimiters into master
Reviewed-on: Disroot/gpg-lacre#89
2022-06-08 19:32:27 +00:00
Piotr F. Mieszkowski 881a8d1756 Add GnuPG encryption support for addresses with delimiters
If a user registers their key for address alice@example.com but receives a
message sent to alice+something@example.com, this message should be encrypted
as well.

- Implement delimiter support for GnuPG encryption.

- Add E2E test case for a clear text message delivered to an address with
delimiter.

- Fix minor bug: wrong configuration parameter was retrieved when logging
information about enc_domain_keymap being active.
2022-06-08 21:20:58 +02:00
Piotr F. Mieszkowski c86c620668 Extract delimiter support, add unit tests
Also: fix recursive call to get_cert_for_email.
2022-06-07 22:14:32 +02:00
pfm c4781f2ac8 Merge pull request 'Record execution time and log it' (#86) from 84-measure-time into master
Reviewed-on: Disroot/gpg-lacre#86
2022-06-02 21:44:56 +00:00
Piotr F. Mieszkowski 251e6d1270 Record execution time and log it
After each execution, log an entry with information about total seconds from
the start to the end of execution and the value returned by
time.process_time() function, which returns:

	sum of the kernel and user-space CPU time

according to the documentation.

This feature can be used to collect stats about Lacre performance.
2022-06-02 23:41:14 +02:00
pfm cb219799d2 Merge pull request 'Use CRLF for line-endings' (#83) from 78-fix-encryption into master
Reviewed-on: Disroot/gpg-lacre#83
2022-06-02 18:00:17 +00:00
Piotr F. Mieszkowski 937046eb17 Use CRLF for line-endings
Mail RFCs use CRLF for line endings and it turns out things may break in
strange ways if only LF is used.
2022-06-02 19:56:32 +02:00
Piotr F. Mieszkowski 65d2a77486 Don't break Content-Type header with LF - part 2 2022-06-02 19:43:27 +02:00
Piotr F. Mieszkowski 06abbc0edd Don't break Content-Type header with LF 2022-06-02 19:37:06 +02:00
pfm 9820e42457 Merge pull request 'Handle text data carefully' (#82) from 75-unify-types into master
Reviewed-on: Disroot/gpg-lacre#82
2022-06-01 21:59:52 +00:00
Piotr F. Mieszkowski 46be24670c Fix charset resolution in Content-Type parser 2022-06-01 23:44:41 +02:00
Piotr F. Mieszkowski 55b58d25bc Use literal separator '@' in sanitize_case_sense 2022-06-01 23:23:51 +02:00
Piotr F. Mieszkowski d3b1717290 Extract PGP/INLINE checks, remove unnecessary byte-check 2022-06-01 23:00:05 +02:00
Piotr F. Mieszkowski 4c6fdc52ec Check mandatory config early, add tests
Also: extend failover logging configuration with file-based handler to make
sure that the user gets _some_ logs even if they do not configure Lacre at
all.
2022-05-31 22:09:10 +02:00
Piotr F. Mieszkowski 3bcc1151e5 Add E2E case: a user with a key and PGP/MIME configured
- Add a new test input message for a new test identity, test scenario
  configuration and a test key.

- While retrieving message payload, determine charset based on the
  Content-Type header.  When missing, default to UTF-8.

- Use more comprehensible variables names.

- Adjust logging levels.
2022-05-30 00:49:40 +02:00
Piotr F. Mieszkowski 707fc96234
Add more contract tests
- Verify that Message.get_payload() returns str, unless passed decode=True,
when it returns bytes.

- Verify that RawConfigParser returns str.
2022-05-25 22:13:40 +02:00
Piotr F. Mieszkowski 558872d9d0 Start documenting dependency contracts with unit tests
Implement some unit tests for 'email' package so we know precisely how this
package behaves.
2022-05-16 20:57:12 +02:00
pfm 35987a6654 Merge pull request 'Clean-up' (#70) from 69-cleanup into master
Reviewed-on: Disroot/gpg-lacre#70
2022-05-14 09:49:14 +00:00
Piotr F. Mieszkowski d27eef911a Update sample config
- Include helpful information about webpanel_url.
- Remove unused database settings.
- Add a hint about MySQL url to the database section.
2022-05-14 11:40:20 +02:00
Piotr F. Mieszkowski 92f3cedc51 Remove leftover .read() call 2022-05-14 11:26:49 +02:00
pfm 5639d8e5b6 Merge pull request 'Improve logging and configuration' (#65) from logging-and-config into master
- Replace custom logging code with "logging" package.
- Unify access to configuration and extract to "lacre.config" package.
- Introduce a new configuration file (with a sample included) to control how and where Lacre writes diagnostic output.
- Update sample configuration.

Reviewed-on: Disroot/gpg-lacre#65
2022-05-13 20:01:10 +00:00
Piotr F. Mieszkowski d8bef9cdb0 Explain syslog logging better in sample logging config 2022-05-13 21:57:29 +02:00
Piotr F. Mieszkowski 11b78ce0fb Adjust log entry levels for severe conditions
When Lacre is misconfigured or can't proceed, report WARNING or even ERROR
level messages.
2022-05-13 21:27:50 +02:00
Piotr F. Mieszkowski acdb2dd5c8 Log cron-job inner workings 2022-05-11 19:57:26 +02:00