Commit Graph

12 Commits

Author SHA1 Message Date
Slavi Pantaleev
bb754f9aa8 Simplify MatchUserWithAllowedRegexes
This used to return an error back when it was dealing with wildcards
(which may or may not have compiled to a valid regex).

But it now deals with pre-compiled regexes and has no chance of failing,
so we need no `error` returns.
2022-08-27 07:50:43 +03:00
Slavi Pantaleev
f8a168b8e7 Add a few more unit test cases 2022-08-27 07:50:43 +03:00
Slavi Pantaleev
8ad2e29930 Add support for configuring user whitelisting
This does not do anything useful just yet.
It will be hooked to access control checks later on.

Wildcards are converted to regular expressions, because it was simpler
to do that than to write (or include) some ugly wildcard matcher library.
It also provides more flexibility, should we wish to use it later.
Regular expressions should also work well performance-wise.

We compile wildcards to regexes early on (during configuration
processing) and fail if we detect a bad pattern. This is meant to
catch various problems (typos or other mistakes) that could happen.

For this to work, configuration building had to be redone, since it can
now return an error. This may be useful in the future for validating
other configuration settings.

Related to https://gitlab.com/etke.cc/postmoogle/-/issues/1
2022-08-27 07:50:41 +03:00
Aine
f2d81495dc refactor Send(), fixes #6 2022-08-26 23:06:20 +03:00
Aine
331c2a8d5e strip <style> in html emails 2022-08-25 21:27:00 +03:00
Aine
f9cf94c914 threads 2022-08-24 21:28:30 +03:00
Aine
d021e6715e Revert "visual fixes"
This reverts commit 34735b2614.
2022-08-24 12:09:23 +03:00
Aine
34735b2614 visual fixes 2022-08-24 12:02:41 +03:00
Aine
e5e9be528b refactor options to be more generic 2022-08-23 21:58:05 +03:00
Aine
81abe8c785 unoptimal refactoring 2022-08-23 19:23:15 +03:00
Aine
69f20e5670 try to receive attachments 2022-08-22 18:43:12 +03:00
Aine
e6d5e81efe bugfixes; email parsing; send emails into matrix rooms; e2e tests 2022-08-22 12:28:29 +03:00