Commit Graph
8011 Commits
Author SHA1 Message Date
Sunil Mohan Adapa fdbe537529 tests: Add fixture to help in testing privileged actions
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:51:12 -04:00
Sunil Mohan Adapa 6e1c8c30fd dynamicdns: Check action script with flake8
- When the action was converted from shell to python3, it was not removed from
the exclusion list.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:51:08 -04:00
Sunil Mohan Adapa 2bd0ef7c61 config: Drop ability to set hostname on systems without systemd
We depend on systemd for many things anyway and this code path is never tested.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:51:04 -04:00
Sunil Mohan Adapa 5a1f4b6647 actions: Allow actions to be called by other users
There is not much additional risk by doing this. This is needed in case of some
exceptional cases such as storage.validate_directory() which need to run as a
different user other than root.

Tests:

- Directory validation works in transmission and deluge.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:50:49 -04:00
Sunil Mohan Adapa 0dff0fc293 actions: Implement getting raw output from the process
Tests:

- export-tar for a backup archive works. Yields reasonable speeds > 30 MB/s.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:50:40 -04:00
Sunil Mohan Adapa 6f5410931e actions: Use separate IPC for communicating results
Currently privileged actions use stdout for returning the results. If any of the
sub-processes accidentally output to stdout, decoding errors occur. Prevent this
by opening a pipe to the privileged action and returning the output in that
pipe.

Tests:

- Run unit tests
- Functional tests for other apps pass

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:50:37 -04:00
Sunil Mohan Adapa 585092ca63 actions: Allow nested and top-level actions
- Currently, privileged actions are not allowed under top-level plinth module.
They are only allowed under each app module. Allow privileged actions under
plinth module.

- Currently, privileged actions are not allowed under a sub-module of
'privileged' package. They are allowed only in 'privileged' module. Allow
sub-modules under 'privileged' package.

Tests:

- Email app functional tests pass
- Functional tests for apps using package and service privileged methods pass

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:50:34 -04:00
Sunil Mohan Adapa 74678c1d69 doc: dev: Minor example code refactor
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:50:31 -04:00
Sunil Mohan Adapa 0e326cfea3 templates: Update HTML meta tags for better description and app-name
- 'application-name' is not meant for regular web pages, just web apps.
FreedomBox qualifies as a web app. Browsers may use this over title.

- 'description' should rather talk about FreedomBox rather than just what role
the web interface plays in the FreedomBox project.

Tests:

- Verify formatting in output HTML.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 09:14:01 -04:00
Tymofii Lytvynenko 4fada0a23e Translated using Weblate (Ukrainian)
Currently translated at 87.9% (1311 of 1491 strings)
2022-10-06 22:22:59 +02:00
Jiří Podhorecký 6268ae1779 Translated using Weblate (Czech)
Currently translated at 100.0% (1491 of 1491 strings)
2022-10-05 11:23:37 +02:00
Tymofii Lytvynenko 2712da4c5d Translated using Weblate (Ukrainian)
Currently translated at 87.0% (1298 of 1491 strings)
2022-10-03 16:15:39 +02:00
Michael Breidenbach 4c2743451f Translated using Weblate (Swedish)
Currently translated at 100.0% (1491 of 1491 strings)
2022-10-03 16:15:39 +02:00
James Valleroy aa47619719 Release v22.21.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v22.21.1
2022-10-01 10:07:29 -04:00
109247019824 cd6bdf6bd7 Translated using Weblate (Bulgarian)
Currently translated at 39.8% (594 of 1491 strings)
2022-10-01 15:58:59 +02:00
Andrij Mizyk b2ec39ec5e Translated using Weblate (Ukrainian)
Currently translated at 86.1% (1285 of 1491 strings)
2022-10-01 15:58:58 +02:00
Sunil Mohan Adapa d69167bcfa notification: Don't fail when formatting message strings
- When a notification's message contains unexpected formatting characters such
as '{}', showing the notification and consequently the entire FreedomBox web
interface fails. Prevent that by make sure that that message formatting never
fails.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-01 08:02:51 -04:00
Andrij Mizyk d8da0a41e5 Translated using Weblate (Ukrainian)
Currently translated at 85.9% (1281 of 1491 strings)
2022-09-28 18:23:25 +02:00
James Valleroy 23e760c9a0 setup.py: Move distutils import after setuptools import
Fixes: #2267

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v22.21
2022-09-26 21:57:28 -04:00
James Valleroy bc26cfa4cf Release v22.21 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-09-26 20:48:05 -04:00
James Valleroy 02239e6747 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-09-26 20:45:55 -04:00
James Valleroy 355c43cb35 locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-09-26 19:52:24 -04:00
Sunil Mohan Adapa 31d7471405 d/install: mediawiki: Install the new powered by file
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-09-26 13:22:31 -07:00
nbenedek 178941079e mediawiki: Add powered by freedombox logo
Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Convert the PNG to SVG and use it for all sizes]S
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-09-26 12:31:47 -07:00
109247019824 1494c3cf8b Translated using Weblate (Bulgarian)
Currently translated at 39.1% (584 of 1491 strings)
2022-09-26 16:19:38 +02:00
Michael Breidenbach f365cf555b Translated using Weblate (Swedish)
Currently translated at 96.0% (1432 of 1491 strings)
2022-09-26 16:19:37 +02:00
nbenedek 663cd4ac22 wordpress: Add fail2ban filter and jail
- I tested the changes with the VirtualBox image with a bridged network adapter.
After ten failed authentication attempts, my IP got blocked as expected.

- This setup uses apache's logs to filter the attempts. A wordpress
[plugin](https://wordpress.org/plugins/wp-fail2ban/) exists for redirecting the
logs to syslog, but that needs to be packaged.

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Drop logpath as logs are expected to go to journald]
[sunil: Update regex to match only failures and not successful logins]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-09-23 14:18:54 -07:00
James Valleroy 9a0be419f5 janus: Allow AF_UNIX and AF_NETLINK
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-09-23 08:01:57 -04:00
Sunil Mohan Adapa 2f8ccf3dd0 wordpress: Reload apache after app update
- So that the new configuration file to disable
readme.html/xmlrpc.php/wp-cron.php takes effect.

Tests:

- Install wordpress without the security changes. Notice that the three URLs are
accessible. Apply the patch, run ./setup install and restart FreedomBox service.
Wordpress app is updated and the security changes take effect. The three URLs
are return forbidden response without manually restarting apache2.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-09-22 14:13:33 -07:00
nbenedek f702e044f3 wordpress: disable readme.html, xmlrpc.php, wp-cron.php
Closes: #2244.

This patch disabled xmlrpc.php functionality entirely. For interacting with
WordPress using app, the new REST API functionality is recommended. However, for
the Pingback API XML-RPC is still a necessity. If this is an important feature
for FreedomBox users, we intend to re-enable XML-RPC functionality in WordPress.

Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-09-22 13:52:55 -07:00
James Valleroy 43532e8349 janus: Enable systemd sandboxing
Helps #299.

Tests:

- janus functional tests pass.

- Sandbox coverage for janus is 81%.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-09-22 11:09:28 -07:00
Andrij Mizyk b4225a305a Translated using Weblate (Ukrainian)
Currently translated at 85.7% (1279 of 1491 strings)
2022-09-21 13:20:40 +02:00
Andrij Mizyk c9d78153ea Translated using Weblate (Ukrainian)
Currently translated at 85.7% (1278 of 1491 strings)
2022-09-19 21:16:03 +02:00
ikmaak b638da5ed9 Translated using Weblate (Latvian)
Currently translated at 2.8% (43 of 1491 strings)
2022-09-14 19:20:02 +02:00
Besnik Bleta 805bb8234f Translated using Weblate (Albanian)
Currently translated at 92.8% (1385 of 1491 strings)
2022-09-14 19:20:02 +02:00
ikmaak e82c483a7e Translated using Weblate (Albanian)
Currently translated at 92.8% (1385 of 1491 strings)
2022-09-14 19:20:01 +02:00
ikmaak 3e200f77ce Translated using Weblate (Serbian)
Currently translated at 11.7% (175 of 1491 strings)
2022-09-14 19:20:01 +02:00
ikmaak 310ae9589e Translated using Weblate (Greek)
Currently translated at 64.3% (959 of 1491 strings)
2022-09-14 19:20:01 +02:00
109247019824 50d5e8357a Translated using Weblate (Bulgarian)
Currently translated at 39.0% (582 of 1491 strings)
2022-09-14 19:20:00 +02:00
ikmaak 6cd1568593 Translated using Weblate (Bulgarian)
Currently translated at 39.0% (582 of 1491 strings)
2022-09-14 19:20:00 +02:00
ikmaak 82f2b5da7b Translated using Weblate (Slovenian)
Currently translated at 8.9% (134 of 1491 strings)
2022-09-14 19:19:59 +02:00
ikmaak 40319f74ab Translated using Weblate (Lithuanian)
Currently translated at 3.1% (47 of 1491 strings)
2022-09-14 19:19:59 +02:00
ikmaak 6ba8ca4eae Translated using Weblate (Hungarian)
Currently translated at 94.5% (1410 of 1491 strings)
2022-09-14 19:19:58 +02:00
ikmaak 4d796d0624 Translated using Weblate (Ukrainian)
Currently translated at 84.4% (1259 of 1491 strings)
2022-09-14 19:19:58 +02:00
Andrij Mizyk 87ec245990 Translated using Weblate (Ukrainian)
Currently translated at 84.4% (1259 of 1491 strings)
2022-09-14 19:19:57 +02:00
ikmaak 82566fe768 Translated using Weblate (Czech)
Currently translated at 99.9% (1490 of 1491 strings)
2022-09-14 19:19:57 +02:00
ikmaak 9e08c327e2 Translated using Weblate (Indonesian)
Currently translated at 58.4% (872 of 1491 strings)
2022-09-14 19:19:57 +02:00
ikmaak 13f3789e27 Translated using Weblate (Persian)
Currently translated at 15.6% (234 of 1491 strings)
2022-09-14 19:19:56 +02:00
ikmaak 9ffa3f3c02 Translated using Weblate (Polish)
Currently translated at 31.6% (472 of 1491 strings)
2022-09-14 19:19:56 +02:00
ikmaak afe682e8e9 Translated using Weblate (Russian)
Currently translated at 96.5% (1439 of 1491 strings)
2022-09-14 19:19:55 +02:00