pfm
35987a6654
Merge pull request 'Clean-up' ( #70 ) from 69-cleanup into master
...
Reviewed-on: #70
1 week ago
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.
1 week ago
Piotr F. Mieszkowski
92f3cedc51
Remove leftover .read() call
1 week ago
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: #65
1 week ago
Piotr F. Mieszkowski
d8bef9cdb0
Explain syslog logging better in sample logging config
1 week ago
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.
1 week ago
Piotr F. Mieszkowski
acdb2dd5c8
Log cron-job inner workings
2 weeks ago
Piotr F. Mieszkowski
7a8720c142
Update installation instructions, add sample logging config
2 weeks ago
Piotr F. Mieszkowski
8f0d8f4933
Add newlines to key material
2 weeks ago
Piotr F. Mieszkowski
617a208fe9
Fix indentation and names after rebase
2 weeks ago
Piotr F. Mieszkowski
9dfc447169
Use Lacre logging and configuration in register-handler
2 weeks ago
Piotr F. Mieszkowski
af5a5b4176
Use Lacre logging and configuration in cron.py
2 weeks ago
Piotr F. Mieszkowski
75ccfb0850
Use logging module
...
- Replace custom logging code with calls to logging module.
- Use logging.config to provide configuration parameters.
To make Lacre's logging more flexible, use fileConfig from logging.config to
set up all parameters. If the configuration file is missing, use dictConfig
with hardcoded reasonable defaults.
2 weeks ago
Piotr F. Mieszkowski
baf7954270
Use list booleanness instead of comparing with empty list
2 weeks ago
Piotr F. Mieszkowski
031c7234f6
Reorder top-level expressions
2 weeks ago
Piotr F. Mieszkowski
d90b50f7e7
Extract config, separate logging, split into smaller functions
...
- Move configuration-processing code to a separate module (lacre.config) and
provide a simple API to access configuration parameters.
- Prepare to use builtin logging module to log diagnostic data.
- Rework the configuration-processing file to make it cleaner.
- Log additional information while processing configuration.
- Reorder functions.
2 weeks ago
pfm
7767dfaff9
Merge pull request 'Fix minor cron.py issues' ( #64 ) from fix-cron-script into master
...
Reviewed-on: #64
2 weeks ago
Piotr F. Mieszkowski
55fa0d0601
[GnuPG.confirm_key] Convert email to bytes() before comparison
2 weeks ago
Piotr F. Mieszkowski
71afd6ed05
[GnuPG.confirm_key] Set 700 mode for temp. key home
4 weeks ago
Piotr F. Mieszkowski
a82ff9f3f1
Use actual keys (RSA and Ed25519) in cron-test
4 weeks ago
Piotr F. Mieszkowski
52b31028c5
Fix config key typo
4 weeks ago
Piotr F. Mieszkowski
b19a76e297
Update testing documentation
4 weeks ago
Piotr F. Mieszkowski
ffc53b935a
Finish migration to SQLAlchemy and automate testing cron.py
4 weeks ago
Piotr F. Mieszkowski
7aff414fb7
Use SQLAlchemy to access database
...
- Replace hardcoded MySQLdb package with sqlalchemy to support other RDBMS
backends.
- Provide a script that could eventually replace schema.sql (schema.py).
- Update sample configuration.
4 weeks ago
muppeth
86b725349f
added smtp auth to cron.py
1 month ago
Piotr F. Mieszkowski
ea0e012c04
Use 'open' to open a file
1 month ago
Piotr F. Mieszkowski
454b519c70
Use bytes in confirm_key's line operations
1 month ago
Piotr F. Mieszkowski
f472f4ac22
Use isinstance() instead of type()
1 month ago
Piotr F. Mieszkowski
fdadc89c31
Use bytes in GnuPG.confirm_key too
1 month ago
Piotr F. Mieszkowski
5a34249090
Fix minor cron.py issues
...
Related to #63 : TypeError: memoryview: a bytes-like object is required, not
'str'.
- Allow GnuPG.add_key accept either 'str' or 'bytes'.
- Import MIMEText from email.mime.text.
1 month ago
muppeth
c4e9e3e840
compatibility update for php7/8 ( #61 )
...
Co-authored-by: muppeth <muppeth@disroot.org>
Reviewed-on: #61
2 months ago
pfm
d1de1f0695
Merge pull request 'Remove support for decrypting emails' ( #60 ) from remove-decryption into master
...
Reviewed-on: #60
2 months ago
Piotr F. Mieszkowski
59b932abaa
Remove support for decrypting emails
2 months ago
pfm
968677f1ec
Merge pull request 'Migrate to Python 3.x' ( #58 ) from py3-migration into master
...
Reviewed-on: #58
Reviewed-by: muppeth <muppeth@no-reply@disroot.org>
2 months ago
Piotr F. Mieszkowski
c4927d2722
Avoid unnecessary list creation
4 months ago
Piotr F. Mieszkowski
9e17726e39
Use f-strings for formatting
4 months ago
Piotr F. Mieszkowski
67a938c049
GnuPG.add_key: Use build_command
4 months ago
Piotr F. Mieszkowski
03fc3d138e
Update testing documentation
...
- Explain how to specify Python binary path used during tests.
- Mention test logs.
4 months ago
Piotr F. Mieszkowski
a201265f87
Rework how E2E tests are executed
...
Tests kept breaking (not failing) randomly with "Broken pipe" errors. Rework
how processes are spawned to make sure that it doesn't break them again.
4 months ago
Piotr F. Mieszkowski
c81c6e6e0d
Remove hardcoded python3.8 path
...
- Let the user overwrite Python binary name while calling make.
- Use environment variable set by make to instruct e2e_test.py which binary it
should call to execute Python code.
4 months ago
Piotr F. Mieszkowski
5a8d2c0108
Add E2E cases: signed cleartext and multipart/encrypted
4 months ago
Piotr F. Mieszkowski
435528de43
Add an E2E test case with an already encrypted message
4 months ago
Piotr F. Mieszkowski
24f0c86d4f
Tidy up tests
...
- Makefile: add 'unittest' to .PHONY targets.
- Remove unnecessary #! line from e2e_test.py.
- Extract Python path to test/e2e.ini file.
4 months ago
Piotr F. Mieszkowski
1e7d33c1df
Handle bytes properly
...
Fix bytes sequences handling after auto-migration.
4 months ago
Piotr F. Mieszkowski
b2a01c15b0
Fix auto-migrated code
...
- Use b'' (byte strings) where appropriate.
- Fix indentation.
- Replace python2.x references with python3.x.
4 months ago
Piotr F. Mieszkowski
5f02223ec7
Perform automatic migration to Python 3.x
...
Use lib2to3 automatic migration tool provided by Python 2.x to convert
codebase to new idioms.
Command line:
find . -type f -name '*.py' \
-exec python2.7 -m lib2to3 \
-f all -f idioms -f buffer -f set_literal -f ws_comma -w \
'{}' '+'
4 months ago
pfm
ee0d65f6bb
Merge pull request 'Add tests for Python code' ( #51 ) from 39-add-tests into master
...
Reviewed-on: #51
Reviewed-by: muppeth <muppeth@no-reply@disroot.org>
4 months ago
Piotr F. Mieszkowski
3b9f714cdb
Ignore random_seed
...
Do not keep test/keyhome/random_seed in repository.
4 months ago
Piotr F. Mieszkowski
1002da78fa
Clean up test messages
...
Remove unused msgout files, fix addresses in msgin files.
4 months ago
Piotr F. Mieszkowski
2cf60dec40
Add unit tests for GnuPG command-line generator
...
Extract a function to calculate GPG commands to be executed and cover it with
unit tests.
4 months ago