8325 Commits

Author SHA1 Message Date
James Valleroy
4a62d4fc77 freedombox Debian release 23.18
-----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmUSMyMWHGp2YWxsZXJv
 eUBtYWlsYm94Lm9yZwAKCRB3wMdee2UICI3DEACAkOF4kOwtA8Lqy1tGCLVg8z3m
 ff+zDNDpi14vMu43Chz3xTfmPNtZQ20fRKQ78a1+IvOVZShaaZiqevGD/9rvbuBV
 RHQm+6YIR6Z5HqTQNnkKHO585q6JF1AxzgzMBt5cR98k5pIUykUKZAb32fgpzj8a
 Yxc8+vvPzNqyR1SCTT7PZDmjr46vi5c+mVcxPA017PrFtTSgIa8NTuTcXWInP5me
 JVFa8IuFqnNh05BwVW0qeCigQZ1Pvf/1TS3/VB2y2+52oPQeJdAzF0tKTSZJDUJb
 aH1er+PG5/YPlKU/oQpPK9oJn7eKzM8NqfTVEMyGKA+L0e7L4oNFnWTP2ctNQhh/
 DX+7D2sqZ6ALbS4A0Ur9hxifX0clIRzaohNYS77LztH178ZEZifNylL7qqO4qPWa
 tqLu0wPWT5WWDLUxkpDQSn7BhWZBIn4r4Xu5adWjvLA48/UHcrTkw6tpLlH0PDn6
 nXAaDraZOZJtrx1HbMUiwafPZ0ZZ5bQP0iS+8PHQGuV4dEiFuQ6M7L+hv93KEwlN
 Gf/Br8G123EqoZ/jknvuAP0qDC45R9mSRSyfi4h2Oi9/81y9XENIX9d99ddiiov+
 /yTE/4SIFDOzz8DionwRZhbWS9waHHiDQicAS7BopZUVjUr55E6foi461J43+zP3
 weP3eSvGV4k+JTkyKA==
 =ZDWe
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmUWCocWHGp2YWxsZXJv
 eUBtYWlsYm94Lm9yZwAKCRB3wMdee2UICI3WEADTuOoWqcsu8uJXksRdudQDJKAv
 GbXSzB5I7Ykb3sdIZRzRWYei7EFJrrxbSXbWlDbVXvz2hqAC43z+DknpG0RrT9u+
 lhffkm0luPE0mafZsOS+S0IuGu2a37DdKGFTp5+htwH6ekxM/tD/u2QFgaHbo0fL
 zZ3JjnUIfTHsJB16jtYowahf35Oh8gIodEvLA8tnF3lI+dRZtzwATictt6ux2rRL
 +Z3V0k5pFdKbjc5ZRyYZHtkOtPiNyQEIV1Zx3LUs42Q4qga2cZev8jRH/NDilZ+4
 2cFkeLAWKD34LA3odNbqOyKo9vMnbCFDO5H8VS5a+d6CXfP9EdkSTVWwZFWvyE2r
 xhqO6NEVmwOCXeNhye2Ajcg75ZU4i6+ro85SQyUEEr1s7+0tEQZxec/UV3Q7sc5r
 xaqj2dYJZOOjRufAIdDgZizhoTbRlQMsUg2J68dlg+2dH85OL4ncIz9OKTOYiF3s
 G8hdsP/XEI6im/ghdI0QcbmgWHB2D022iIZENxcJXsg+IY4cadwzMmfAr5LuxgGh
 W5qm9uRwz8zSW99TVAtK1Hq1U/WIqLe7LFIFY7+10B2e+dcGl+yF6vAS4Sj56ke3
 KlPzLYc0DHHHtdHq/UG9xS8myrWwK2YAQzSq4RfBIHnGmQeuQsPoYD4wIc5MRKyX
 jLdmo9UcmsPDaBnpSw==
 =AWE7
 -----END PGP SIGNATURE-----

Merge tag 'v23.18' into debian/bookworm-backports

freedombox Debian release 23.18

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-28 19:21:41 -04:00
James Valleroy
db5444558f
Release v23.18 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v23.18
2023-09-25 20:47:40 -04:00
James Valleroy
c73e24708d
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:46:55 -04:00
James Valleroy
c1e5b3bfd3
locale: Update translations strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:16:49 -04:00
Sunil Mohan Adapa
eba41aa295
pyproject: Add configuration for mypy to ignore some libraries
- This way, we know what we are overriding and can use type annotations for
libraries where they are available.

- Invocation of mypy tool on command line becomes straight forward.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:42 -04:00
Sunil Mohan Adapa
bb7782a464
*: Add some additional type annotations
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:38 -04:00
Sunil Mohan Adapa
38ece87c6c
*: Utilize newer 3.10 syntax for type hints
Tests:

- mypy does not show any errors.

- Installing ejabberd app works. Privileged actions run fine.

- Unit tests work.

- No additional testing was done as type annotations don't have any effect at
runtime.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:34 -04:00
Sunil Mohan Adapa
a86a86d605
gitlab-ci: Make passing mypy checks mandatory
- There are no more checks that are failing.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:31 -04:00
Sunil Mohan Adapa
2dd00a8f08
*: Fix all typing hint related errors
- Try to mark class variables in component classes.

- Leave typing hints generic, such as 'list' and 'dict' where content is usually
not filled, too complex, or context is unimportant.

- backups: Handle failure for tarfile extraction so that methods are not called
on potentially None valued variables.

- backups: Prevent potentially passing a keyword argument twice.

- dynamicdns: Deal properly with outcome of urlparsing.

- ejabberd: Deal with failed regex match

- email: Fix a mypy compliant when iterating a filtered list.

- tor: Don't reuse variables for different typed values.

- tor: Don't reuse variables for different typed values.

- operation: Return None explicitly.

- operation: Ensure that keyword argument is not repeated.

Tests:

- Where only typing hints were modified and no syntax error came up, additional
testing was not done.

- `mypy --ignore-missing-imports .` run successfully.

- Generate developer documentation.

- Service runs without errors upon start up.

- backups: Listing and restoring specific apps from a backup works.

- backups: Mounting a remote backup repository works.

- NOT TESTED: dynamicdns: Migrating from old style configuration works.

- ejabberd: Verify that setting coturn configuration works.

- email: Test that showing configuration from postfix works.

- tor: Orport value is properly shown.

- transmission: Configuration values are properly set.

- users: Running unit tests as root works.

- operation: Operation status messages are show properly during app install.

- ./setup.py install runs

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:24 -04:00
Sunil Mohan Adapa
a709f3a6a8
gitlab-ci: Perform backports tests on bookworm instead of bullseye
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:21 -04:00
Sunil Mohan Adapa
ac84258f05
upgrades: Fix detecting apt over tor during upgrade
- This was missed during the split of tor/torproxy apps.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:16 -04:00
Sunil Mohan Adapa
995749a975
wordpress: Use absolute path in service file
This is the recommended approach. On Debian, php is usually resolved to
/usr/bin/php.

Tests:

- Tests with absolute path in service file were performed as part of testing
done in https://salsa.debian.org/freedombox-team/freedombox/-/issues/2373 . No
separate testing was done.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 17:41:11 -04:00
rsquared
a6165c997a
ikiwiki: Disable discussion pages by default for new wiki/blog
Closes: #2102.

- Wiki: Unchanged behavior is to have discussion pages enabled. To post users
must login.

- Blog: Earlier behavior is to allow anonymous users to post comments. They go
into the moderation queue when posted. This could lead to a lot of spam comments
to moderate. New behavior is to allow posting comments only when logged in.

- Blog: discussion => 0 does not effect comments. It is meant for discussion
page on the blog's home page (and possibly other pages). Discussion on those
pages is disabled by default.

- The changes only apply to defaults. Everything can be changed from Setup page.

Testing:

- Test the above described behavior in Debian testing.

- Debian stable testing was not done as the version of ikiwiki is that same as
testing.

[sunil: Drop removal of discussion from wiki pages]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-09-25 12:58:04 -07:00
James Valleroy
4b90e7618f
middleware: tests: Add tests for common error middleware
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-09-22 11:20:08 -07:00
Brian Ó Donnell
557a3b2588
middleware: Add new middleware to handle common errors like DB busy
- During database error such as 'database is locked', show a special message
asking users to try again instead of submitting a bug report.

[sunil: Minor formatting, rename the template file name]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Fix missing import]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-09-22 11:19:47 -07:00
109247019824
81cbd307f5
Translated using Weblate (Bulgarian)
Currently translated at 46.1% (703 of 1523 strings)
2023-09-18 19:00:45 +00:00
109247019824
5fd7d6fb5c
Translated using Weblate (Bulgarian)
Currently translated at 46.0% (702 of 1523 strings)
2023-09-15 21:49:59 +02:00
James Valleroy
32942a65a5
Release v23.17~bpo12+1 to bookworm-backports
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v23.17_bpo12+1
2023-09-15 07:08:15 -04:00
James Valleroy
814b16764b freedombox Debian release 23.17
-----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmT/vLsWHGp2YWxsZXJv
 eUBtYWlsYm94Lm9yZwAKCRB3wMdee2UICBSED/0fIuE0J1VzusrN21VP/4z36KwO
 fvuI8M0vXeqZwgcGXPCBAPR9qkOFysPkNW2rEfKJEzAl1j9A2c5WXQiglDxFxiX8
 +l33DrI708CX4u6eQ0rx7wOuK21HbVADh/QWjS1I/A/k6zOexPQ4ONHYXYZKYCEV
 x/hKIitQO0k3ox5M0JPpJqYQapZqBQyV0TeCklHRXsDrELVpMrZ5udlcxSwos3RQ
 qN3IQFCJYZf1qcWWlyyqYpWXAlHmMECiPMq1LP/XQaVCtiZ7yTxsRusse2NC/xsr
 +qadKDKdtCtiHTOjJXtoKwStcsm3CAD8DC6i11n7vN6PhekZ2EGdJGdiHOlbeWi2
 KPrrbvC/JeMTWVV2pvVca/022ccfnzlIs9VaSrRD+vDwBOn0oPVh/IgfHcOv638Q
 42vwBHW+XDs360htg+cDvwWgEDIYBLhMLS1fPTi6ElXLBa+NesaRYkWNWr810KAr
 Dt98Zk0Z5hGNoviwHqLqe3vqY7HVCkIaiWCXMP+dt9cAVVb6SkMsrYRNQroAHSor
 AiDzxHkRbUuI+V/pMLrU7GvNxMguZYBdN4hx41Uarb9pTEOrI3yXAy3FIwFQmm/B
 XXg55lMp9zg3aTBYfWz7xFAx6w8FIIoiXtKrdPa3gpVbM6M/ynQPpZuhccV1DvDz
 ppr37zLPwG88EIK/Bw==
 =nvXi
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmUEOskWHGp2YWxsZXJv
 eUBtYWlsYm94Lm9yZwAKCRB3wMdee2UICNYcEACfZBRJEQzlxjxfWC6NW9Dp71LX
 scDcFLh/sCscOd+4lrDuiIsDMpPKFmyN/qDNRZfvQutufiypL6KxskoW3PbCyYis
 2v1jOVSXHuFs+onKIt/YFMcpNQbBYJhDDmT5F3qrHXKqsAbV8SDRZuwoCEFJr9eM
 q8gpbq4iHmp+5fl2miAxagiQcNrdUQP/cvOYQ0tpaVjVIkxmwDkiGIYAJNoncnTI
 bYJ7KL30TA8bgJZWrUT4mARChvff3gomS8yB34CCXg+HobTSoeP6QI5hTyGeV/Zx
 4+6ZW45535cUspVXlY8KcQREs8LI4hb4uUBIPLzHYbF1hQkblq4pkGDnBpnlwEo4
 q1jeXYZBF5chGW0C3KoX9nStpIVhNeRRbg16WExbtcSHY8vfGP00wFIQ4jaJQrzQ
 C7yWR52qz0dQjwgh73ou+k2ujyV3rZFE6ZLhqKxsFy1ep4RFlfno9WB3GsVliyGp
 GTFMNmWfFnPeeZsbWcPLhsoYvMv5WS3jt7U2YfLYIEFBvjDrysa6cqVFXLtlTdnl
 05FZxRs2bcTY3rR3f+XZ/oGKTO7Nm9uaEGwjMtwEQUB6a/yLtt+3z8nft+miG+G8
 97gl+YjC6XZxcNYOuGvxu1YkRPTBgrtrWLk/6yPNpXF/MH9LMmsqyy0s05B/h6YJ
 JMdDJMsO5Ma1j0N2qA==
 =WrB1
 -----END PGP SIGNATURE-----

Merge tag 'v23.17' into debian/bookworm-backports

freedombox Debian release 23.17

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-15 07:06:47 -04:00
James Valleroy
625eb28007
Release v23.17 to unstable v23.17 2023-09-11 20:48:01 -04:00
James Valleroy
a2c5e315d8
doc: Fetch latest manual 2023-09-11 20:46:40 -04:00
bittin1ddc447d824349b2
e07e202ced
Translated using Weblate (Swedish)
Currently translated at 100.0% (1523 of 1523 strings)
2023-09-08 20:24:57 +02:00
ikmaak
92022f0492
Translated using Weblate (Dutch)
Currently translated at 100.0% (1523 of 1523 strings)
2023-09-05 21:53:27 +02:00
Ihor Hordiichuk
68eba842a3
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1523 of 1523 strings)
2023-08-31 21:50:15 +02:00
Jiří Podhorecký
acb03eeed7
Translated using Weblate (Czech)
Currently translated at 100.0% (1523 of 1523 strings)
2023-08-31 21:50:14 +02:00
Burak Yavuz
21cac8bc4e
Translated using Weblate (Turkish)
Currently translated at 100.0% (1523 of 1523 strings)
2023-08-31 21:50:14 +02:00
gallegonovato
b3f1862df3
Translated using Weblate (Spanish)
Currently translated at 100.0% (1523 of 1523 strings)
2023-08-31 21:50:13 +02:00
James Valleroy
01f059c8df
Release v23.16~bpo12+1 to bookworm-backports
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v23.16_bpo12+1
2023-08-31 06:50:46 -04:00
James Valleroy
28473a96be freedombox Debian release 23.16
-----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmTtSzQWHGp2YWxsZXJv
 eUBtYWlsYm94Lm9yZwAKCRB3wMdee2UICIa0D/4vz+Xc1UDWsl0pWBbZKuTFaBIA
 3A784H5j+ccnS4VzayRGYaLta85R076u6ftyrsHTE6/fFnkvLsU+Fs+n66Fq7ay0
 Qq+Bn//kcRjVdp72bdzoSeThmanqQjGvIBuC3gvCydEDpV98fD8CQ1vV/bvQcu0+
 PsPfxYsSu1OLhNEzrB/9u7r9YQvidP8Yl583q2AP1nRth0BENRH5T5bybENlME9c
 cRq/XNa3t3NzIl5gXe5dE2W52qskjuXZhoNSPkZlXrsevI7vxd/RVCoLWqYfdhl9
 tDfM+59mzhqo15k80LwvjgTTmM8w5q3qYvi/ziW8Jka4BPn1g9qlcsWpUqJmeTcl
 rnZCnbwOMxVpD3dDf95mFSREIIws6zs/S1JTcL9yhQVEofe167ncDGQA6UUMr9J8
 BUaVztK4XUYJsDkIliQ0bWOZ80TtuNDtaEvU9UTLlCnsL1V/EANm6FLL2qqjNbJ4
 MfBR2yRF2Gm6fT4YLsyaVabZxVpHoWRj4w59QV0m2oXpeVwYfGrNuHIN6lnwoQUG
 6h9cgK2ah2L4GHVIRkzPVGFcjljHRjDaR/Nb+MNZoN/CxlPsbuhz82FCfUUcSwxv
 Kw4Oc+4DbSbujEiGFXwqlXe9JbI3g8nOethrYH+drghUP4mx/DDgBt48b1KtUs2S
 WuDL9UnixcAo0ncpXQ==
 =TA9W
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmTwcFUWHGp2YWxsZXJv
 eUBtYWlsYm94Lm9yZwAKCRB3wMdee2UICJbZD/0XH5Lji6b9e3mL+9w6jGJo56OO
 ApHv6PhREKTuJMR8Ej++k7jrPYpO2uDW5+SUOBwiJ3ys/N3DybvLV9F+cpGGlqek
 wEMlocsdzEumDqWs4kpk46uMpu5X/Xw2aRHELF6cXa/Sm7rntIH8AMx8+7ulmC5I
 HAhIJftbZ5CjnC59rg3/P+mcbUUG4YxDwt6GizEw8YMqPuoA3CeSJwWICWZNqC/V
 b8qd246FCNLCr/9YPYe9g0kXQxI4d4mR+qvP+bvbGMzI2DVCxhc3KmGii4LbBsLV
 E2H2w5G/1cPneXbrO0W1/XRJLF2huawZu9JDAqYulgJopZFuzPGRmzRJYIcZUxhI
 oD6ZGwSaON5pLs38oyaRXjyK/92tqn1T3xQ0RFqAnD/GVzrL0w1yTSMs3w1Gh/mC
 wkSrEPcO56FuYaxjMrhjMmwtE2KdMG5wGEG8FzpefMbPFfbfZw/NYmqGG5HK8pvs
 tVNUXzchnjDhItQQ6uRGzlrfL+lHpWmQik1r2WrF0bie6Ar+DQLLcqClzpZ19Hxh
 cXjb7D5RBLtW2dIo+r4rAaLn5DReHWHaP0eAdPjJgKqBxoHGFdAw/kz/upXguCWc
 PIJR82oWfVkPMo1oT2CNDczPr/amCTzi0twvN1/VDa1AYrXTbPz/6+FiuJXtRVNw
 M/zJv0ZLZqcmof/XrQ==
 =S0xp
 -----END PGP SIGNATURE-----

Merge tag 'v23.16' into debian/bookworm-backports

freedombox Debian release 23.16

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-31 06:49:55 -04:00
James Valleroy
f527e5db52
Release v23.16 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v23.16
2023-08-28 20:48:23 -04:00
James Valleroy
bc90be15f3
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-28 20:46:06 -04:00
James Valleroy
ae1e56df38
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-28 20:07:46 -04:00
Sunil Mohan Adapa
fa58633e81
openpvn: Renew server/client certificates
- Set renewal period to 3 years before expiry so that users not inconvenienced
too much.

- Renew server certificate if possible.

- There are openvpn server setups where the expiry of the server certificate has
been set to 2 years due to a bug in our code. Triggering a setup call will renew
these certificates without effecting any clients. Even during the bug, CA certs
were still be valid for 10 years. So, they are unaffected.

- When downloading profile, if client certificate is renewable, renew
before providing profile for download. Old certificates will still be valid
until their expiry.

Tests:

- Without the patches, install openvpn app. Server certificate will be created
with a validity of 2 years. Download the client profile. Apply patches, setup
will be rerun. OpenVPN will be restarted. Server certificate will be renewed and
show 10 years expiry. Old client profile will continue to connect successfully.
It will have expiry of 2 years. Download the client profile again. It will an
expiry of 10 years and will successfully to the server.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-28 16:53:17 -04:00
Sunil Mohan Adapa
251e2b4064
openvpn: Ensure that re-running setup works as expected
- Don't overwrite the entire PKI directory or CA certificates.

- Don't re-enable app during setup.

Tests:

- Install app with patches. Rerun setup. It succeeds. Server certificate is not
changed.

- Disable app. Re-run setup. App is not re-enabled. OpenVPN is not running.

- Enable app. Re-run setup. OpenVPN is restarted.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-28 16:53:10 -04:00
Sunil Mohan Adapa
0176d706b9
openvpn: Use config file instead of env vars for easy-rsa
- A configuration file seems to be the preferred approach for invoke easy-rsa
since version 3.

- Drop unused configuration keys KEY_CONFIG, KEY_DIR and EASYRSA_REQ_NAME. These
are no longer referred to in the easy-rsa script.

- Remove configuration key EASYRSA_OPENSSL as the value 'openssl' is already the
default.

- Use pathlib.Path to simplify some code.

Tests:

- Re-run setup and notice the ca.cert file has not changed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-28 16:53:06 -04:00
Sunil Mohan Adapa
95f65b5c4b
openvpn: Minor refactoring in setting up easy-rsa
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-28 16:53:04 -04:00
Sunil Mohan Adapa
0e91261446
openvpn: Correctly set expiry of server/client certs to 10 years
- After moving to easy-rsa 3.x, the expiry configuration key changed and
original intention of setting the expiry to 10 years was not working. Update the
key to set the expiry properly.

Tests:

- Install the app freshly and verify the server and client have 'Valid Not
After' date set 10 years in future.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-28 16:53:01 -04:00
Sunil Mohan Adapa
ec89d11494
openvpn: Fix app not installing Debian testing
Closes: #2370.

- In Debian testing (trixie), easy-rsa version is 3.1.5 (up from 3.1.0). In this
version trying to sign a certificate request when the final certificate is
already present leads to an error which fails openvpn app installation.

- In versions 3.1.0 (Debian bookworm/stable) and above, build-server-full also
generates a signing request and then signs the request. So, there is no need to
run them separately.

Tests:

- Uninstall openvpn test that /etc/openvpn directory has been removed. Install
openvpn download client profile and connect using 'sudo openvpn --config
tester.ovpn'. The connection will be successful.

- Files /etc/openvpn/freedombox-keys/pki/issues/{server,tester}.ovpn show
signature values.

- Repeat test for Debian testing and stable/bookworm.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-28 16:52:57 -04:00
Michael Breidenbach
a81f855731
Translated using Weblate (Swedish)
Currently translated at 97.3% (1480 of 1521 strings)
2023-08-28 14:50:27 +02:00
Sunil Mohan Adapa
c4f087ea4a
networks, samba: tests: functional: Fix setting firewall zone
Without the changes, the form submission for setting firewall zone fails with
error similar to "element can't be scrolled to view".

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-23 21:47:51 -04:00
Sunil Mohan Adapa
770974c8ce
sso: Switch to django-axes >= 5.0
- Add explicit dependency on django-ipware >=3. django-axes >= 6 adds
only and optional dependency on django-ipware. Adding explicit dependency make
the behavior safer.

- Depend on django-axes >= 5 where the authentication backend and other features
are available. The new code won't work with older versions. The new approach
uses and authentication backend to deny access to the login form on lockout and
a middleware to redirect user to locked out form when limit of attempts have
been reached.

- Drop old code used for compatibility with django-axes 3.x.

- Suppress verbose and debug messages as django-axes is too chatty.

- Re-implment the CAPTCHA form entirely. In the old style, we have a login form
with CAPTCHA field. That would not work with the new django-axes authentication
middle. On submission of the form, auth.authenticate() will be called. This
call invokes various authentication backends include django-axes authentication
backend. This backend's behavior is to reject all authentication attempts when
the IP is listed in locked table. The new approach is to provide a simple
CAPTCHA form with just the CAPTCHA field. If the form is successfully
validated (correct CAPTCHA is provided), then the lock on the IP address is
reset. The user is then free to perform 3 more attempts to login.

- Update firstboot form to send the request parameter when using
auth.authenticate() method. This needed by Django axes' authentication method
which will be triggered.

Tests:

- Run tests on Debian Bookworm and Debian testing.

- Axes verbose messages and debug messages are not printed on the console when
running FreedomBox in debug mode.

- Only three invalid attempts are allowed at the login page. After the final
incorrect attempt, user is redirected to CAPTCHA page. Visiting the login page
using the URL works but entering the correct credentials still takes the user to
CAPTCHA page.

- CAPTCHA form appears as expected. Clicking the CAPTCHA images downloads the
audio file corresponding to the image. Incorrect CAPTCHA shows an error. Correct
CAPTCHA takes the user to login form where they are able to login with correct
credentials. Entering incorrect credentials 3 times will take the user again to
CAPTCHA page.

- Creating user account during firstboot works.

- Blocked IP address the IP of the client such as 10.42.0.1 and not the local IP
address 127.0.0.1 according the django-axes log messages. While one client IP
address is blocked, another IP is able to login to the same user account that
was attempted by the blocked client.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-23 21:47:39 -04:00
Sunil Mohan Adapa
cf6c604cec
sso: Use POST method for logout
- This prevents CSRF attacks that allow adversarial websites from logging out
users from FreedomBox. Django itself has made this change in 4.x releases.

Tests:

- Logout works with the menu item in drop-down when Javascript is enabled. The
menu item appears similar to other drop-down menu items.

- Logout works with the menu item when JavaScript is disabled on the page. The
menu item appears similar to other menu items.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-23 21:47:36 -04:00
Sunil Mohan Adapa
dc9e86d918
users, networks: Use the autofocus HTML attribute sparingly
Using autofocus too much hurts accessibility[1] as screen readers jump to the
autofocused field. Specifically, it should used only when it increases UX
significantly, when the form is the only thing on the page and there is nothing
to read before the field is filled.

- Networks: There is not much improvement to UX by focusing on a radio select.

- Update User Form: there is a statement to be read before the first element is
filled up. Username is changed rarely but it being focused on.

- First boot user account: There is content to be read before filling the form
and this will be skipped by the screen reader.

Links:

1) https://www.boia.org/blog/accessibility-tips-be-cautious-when-using-autofocus

Tests:

- networks: Add new connection form works. The connection type is not
autofocused.

- users: Update user form works. Username is not autofocused.

- users: First boot form works. Username is not autofocused.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-23 21:47:31 -04:00
Sunil Mohan Adapa
ebf2dd5c80
backups: Remove use of length_is template function
- It has been deprecated in Django 4.2

Tests:

- Add a remote backup location with valid SSH hostname and notice that the list
of SSH host keys are shown properly.

- Add a remote backup location with invalid SSH hostname and notice that the
error "Could not reach SSH host..." is shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-23 21:47:28 -04:00
Sunil Mohan Adapa
da24f852cf
django: Remove use of X-XSS-Protection header
- This header is not supported by modern browsers[1]

- Our Content-Security-Policy header already does a better job.

- Django 4.0 removed this setting and does nothing with it.

Links:

1) https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection

Tests:

- Without the patch X-XSS-Protection header is sent and with the patch it is not
sent.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-23 21:47:22 -04:00
Joseph Nuthalapati
ee05f98833
l10n: Fix error in Czech translation string 2023-08-18 18:57:18 +05:30
James Valleroy
d9a09f3266
Release v23.15~bpo12+1 to bookworm-backports
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v23.15_bpo12+1
2023-08-18 06:39:05 -04:00
James Valleroy
c866100dc0 freedombox Debian release 23.15
-----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmTa2akWHGp2YWxsZXJv
 eUBtYWlsYm94Lm9yZwAKCRB3wMdee2UICMQcEAC86ENO/EvUsvL4DfqvAE87edA6
 BAdrSA+LK4Sv0mtjWOiHzGp+KMDhKzqM5qd2eXlg5EzZu3VVZvHduKSSNJw8epIB
 c4VFkaGT/Ynoz7n07h6Ir8KKwJ8+WZyypH6gPiIBs2BwxiIfnHC3t/K+zoE8mvlZ
 FqozQALcWX9HNtlBa+5NSZ2NGrxPwhoR/BihxHeUlpl8JrJRWKF+jzLVM5YNZTrt
 Z0cGKD4eVe9D3CPzd5iRLOzkM6nPj1m7CF2LHynhRJn0l7tR1R7Y0Na8QA+52YFj
 qGVOpbX4wFzM65BslQ+n7sxx36oLIbt98fuhWquakyQ+3SBeENc64ILO1VXjMbfN
 PF933ZIPt3WOnpjtmP3oaIrnjTus4duwjEco0vRlrmntXxLHbKQd0BOg9Yb9FI+j
 v4h59XoF6rgfmVB9JjeB38hBSRLC/JB3vJIwZ59vkxxM7V9+Q32YnzhonZyK+RQ5
 muHOlk2y+crw/VQo7FUQfHCT6WJ608UB+vrdHgeEa5Gw+irBeBv2V/TP5fsOAVqQ
 zn0zS3iEM2FpC2vgCmjk3tNuEym9oohikMg3LTMEDwgz6a+ntBtmkVlnDjrKCKHY
 BM6+Qw6KPwb0JwZHpeHglLmhFp3vk+fsQRdxBG3UWqcH1fu6IAjfpoFin5M2poJV
 1fvOV6Pud58fp277cw==
 =o8pW
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmTfShIWHGp2YWxsZXJv
 eUBtYWlsYm94Lm9yZwAKCRB3wMdee2UICOYVD/94TSjTSINlfDXJ7yny2rVvFWGT
 9OihFtA+UbBTCaTBt9rRAD2tlinToaXNSgps4MVVOwyxdXpTJFEsxAYImjbGHFTt
 dI4hswVoURzTM+p16Nefd+O1xxkox9+h32XluN95oeUFZZBBgQmRLVxtLfOMOENq
 mV8Op0zxSDvhDhcOHlesRSkKaoEMAFr8JmYKgEzgRoXDtukMrapWx9FVC14LolIa
 NbA/mGPqJfGWFMBGt8PH7L3RacC+vnu4yAbGvWL9J/L0jBFsq8515xNXsAq4vE3f
 ILwFNtdyyQmeErLEPK5RWbNHXd++V0wmszwDSjVf4gGmv2EHentil0Z/sUjlsQDn
 SfPXJH+lwGTQYm9OPsStxd+HTz6jdxcfCcwWZGsDviSI0M/Ruyjy90dUacDiwv4L
 +v9FyFiaerHGxqjCyzJV/pRg48dJbbWnqwly8Gm1NZZSSnvh+Ne/xnp0TAF6b8p4
 3gCQwOqfM96JEZDfxIKY31+a6NR2QKrU6M5cqLtdwRlgpKFON1HD7bJqSkMYZZ59
 tMkJtR6hmnX3/6dA7Rqfg6tT4djyW++EUz4ZAPz2nTqVdrBGcoNJwVY8lRtECeD6
 e7S3EiA/6dyX8oAFt3OwXfUeN4G5olE+Op4zQN81hhj39J/6fB4sldYdPVhOijDR
 7d2nsQnx3MprMQMXlw==
 =CJ4M
 -----END PGP SIGNATURE-----

Merge tag 'v23.15' into debian/bookworm-backports

freedombox Debian release 23.15

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-18 06:38:09 -04:00
Jiří Podhorecký
91c0a67067
Translated using Weblate (Czech)
Currently translated at 100.0% (1521 of 1521 strings)
2023-08-18 00:47:54 +02:00
Petter Reinholdtsen
6ed325d009
Translated using Weblate (Norwegian Bokmål)
Currently translated at 76.3% (1161 of 1521 strings)
2023-08-16 08:52:04 +02:00