8825 Commits

Author SHA1 Message Date
Jiří Podhorecký
7c8d4f8b26
Translated using Weblate (Czech)
Currently translated at 100.0% (1645 of 1645 strings)
2024-08-15 08:09:21 +02:00
Petter Reinholdtsen
9871cb64b7
Translated using Weblate (Norwegian Bokmål)
Currently translated at 70.6% (1162 of 1645 strings)
2024-08-15 08:09:20 +02:00
Petter Reinholdtsen
79fb6f93db
featherwiki, tiddlywiki: Remove redundant </p> in template
Remove redundant </p> to make translation easier.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-14 10:26:08 -07:00
Besnik Bleta
b838b1f1fd
Translated using Weblate (Albanian)
Currently translated at 97.2% (1600 of 1645 strings)
2024-08-14 04:09:16 +00:00
109247019824
c3831c29ec
Translated using Weblate (Bulgarian)
Currently translated at 46.1% (759 of 1645 strings)
2024-08-14 04:09:15 +00:00
大王叫我来巡山
0f7b10613e
Translated using Weblate (Chinese (Simplified))
Currently translated at 65.5% (1078 of 1645 strings)
2024-08-14 04:09:14 +00:00
Burak Yavuz
c1ce6b170b
Translated using Weblate (Turkish)
Currently translated at 100.0% (1645 of 1645 strings)
2024-08-14 04:09:13 +00:00
James Valleroy
99496eb536
Release v24.17 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.17
2024-08-12 22:10:24 -04:00
James Valleroy
246e356fd6
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-12 22:10:19 -04:00
James Valleroy
d8beb8727f
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-12 22:10:05 -04:00
James Valleroy
549bba6e16
firewall: Setup inter-zone forwarding
- Create new policy that allows forwarding between zones.
  See: https://bugzilla.redhat.com/show_bug.cgi?id=2016864#c8

- Increment version to perform setup on upgrade.

Closes: #2355

Tests:
- Build freedombox package, and install on top of Bookworm VM The
  firewall setup is performed. firewall-cmd lists the fbx_int_to_ext_fwd
  policy, masquerade on external zone, and forward on internal zone.

Not tested:
- I did not test forwarding traffic from external to internal zone.
  However, several users have reported following these instructions on
  the forum, and that it solved the issue for them.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Minor refactors for readability]
[sunil: Ensure that operation is idempotent]
[sunil: Reload instead of restarting firewalld]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-12 11:14:43 -07:00
James Valleroy
9d8c32c792
storage: Add diagnostic for grub config issue
If the GRUB install device has not been selected, then grub package
configuration will fail during upgrades.

Tests:

- Install freedombox package with this change in a VM. Check that the
  diagnostic is passed.

- Re-install the grub-pc package with DEBIAN_FRONTEND set to
  noninteractive, so that it fails to be configured. Check that the
  diagnostic is failed.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-11 20:26:21 -07:00
Jiří Podhorecký
ace6dc7471
Translated using Weblate (Czech)
Currently translated at 100.0% (1601 of 1601 strings)
2024-08-12 00:09:22 +02:00
Sunil Mohan Adapa
4de9b6644d
templates: Fix warning about using default.html for form template
- All forms are rendered using django-bootstrap-form excep the
app enable/disable form. Render this one too using django-boostrap-form so that
the default.html is not used for rendering. Using default.html is deprecated in
Django 4.0 and in 5.0 will default to using div.html.

Tests:

- No change in HTML output, appearance or functionality for the enable/disable
button.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-08-11 21:29:23 +03:00
Sunil Mohan Adapa
976f1cec76
django: settings: Don't set USE_L10N on newer versions
- Eliminate a Django warning message.

- This setting has been deprecated. It will be remove in Django 5.0 and is
always on.

Tests:

- On Debian stable, django.VERSION <= (4,0) evaluates to True and on testing it
evaluates to False.

- After the patch, the warning related to USE_L10N has disappeared.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-08-11 21:28:40 +03:00
Sunil Mohan Adapa
96cbd0ef7f
actions: Add error when likely parameters are not marked as secret
This is to ensure that secret parameter which must likely be marked as secret
are not marked as secret. The partially mitigates the biggest disadvantage of
printing all the parameters by default and marking exception, that is,
forgetting to mark.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:50 -04:00
Sunil Mohan Adapa
601d04f47c
actions: Log arguments without secret strings in privileged calls
- When privileged action is called, it is logged without arguments currently.
Extend this to log all arguments but excluding the parameters of type
secret_str.

- When error is raised, all arguments are being logged currently. Extend this to
exclude the parameters of type secret_str.

Tests:

- Privileged actions with secret strings log messages with '****' instead of
secret string.

- When an error is raised in a privileged action, an exception is logged. In the
exception message, the method and parameters are printed. Parameters that are
secret strings are shown as '****'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:47 -04:00
Sunil Mohan Adapa
7175a05733
backups: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged (except initializing init/info a new SSH repository).

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:45 -04:00
Sunil Mohan Adapa
f22d1b31db
users: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged (except deleting the last admin user).

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:43 -04:00
Sunil Mohan Adapa
382b931cd4
ikiwiki: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:41 -04:00
Sunil Mohan Adapa
5c0b15d8f8
mediawiki: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:39 -04:00
Sunil Mohan Adapa
39d0c03700
shadowsocksserver: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:37 -04:00
Sunil Mohan Adapa
4c352619a5
shadowsocks: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:35 -04:00
Sunil Mohan Adapa
bec5e593b3
miniflux: Mark secret strings in privileged actions
Fixes: #2435

Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:33 -04:00
Sunil Mohan Adapa
7dda5455d8
mumble: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:31 -04:00
Sunil Mohan Adapa
fa5648cf18
nextcloud: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:29 -04:00
Sunil Mohan Adapa
533fea5815
pagekite: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:27 -04:00
Sunil Mohan Adapa
195602e7f1
ssh: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:25 -04:00
Sunil Mohan Adapa
d900b2c9b1
bepasty: Mark secret strings in privileged actions
Tests:

- Perform effected actions and ensure that secrets are not logged on the
console.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:22 -04:00
Sunil Mohan Adapa
1d58dcaae1
actions: Define and allow a new alias for str; secret_str
- Method parameters marked with secret_str will not be logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:17 -04:00
Sunil Mohan Adapa
0ff23862a0
makefile: Don't fail while building and installing multiple versions
When older version is already built and later code is updated to newer version
and built multiple .whl files are present in dist/ directory. This confuses the
install script that assumes only one .whl is present. Pip refuses to install
multiple versions of the same package. This error was seen when bringing up the
'stable' container.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-10 21:44:02 -04:00
Joseph Nuthalapati
96bd9c8bd4
tiddlywiki: Add new app
TiddlyWiki uses almost the same Apache configuration as Feather Wiki,
with one difference - disabling gzip for the `HEAD` request.

The FreedomBox app for TiddlyWiki is identical to Feather Wiki in
every other aspect.

- Proxy download through freedombox.org. This serves two purposes:

1. Upstream's website cannot track the IP addresses of FreedomBox users.
2. We can update the versions of the empty quine files without making
   code changes in FreedomBox.

[sunil]

- Update description to correct the list of users who can access the app.

- Update logo to adhere to the logo guidelines.

- Minor styling fix.

- Update the copyright on the logo based on information from upstream git
repository.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-10 17:57:01 -07:00
Joseph Nuthalapati
559a4c30e8
featherwiki: Proxy download through freedombox.org
This serves two purposes:

1. Upstream's website cannot track the IP addresses of FreedomBox users.
2. We can update the versions of the empty quine files without making
   code changes in FreedomBox.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Update description to reflect the change in upstream URL]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.or>g
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-10 16:40:19 -07:00
Sunil Mohan Adapa
0b758423a4
featherwiki: Fix a type check failure
Due to a reassignment to a different type.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-08 07:35:15 -07:00
Sunil Mohan Adapa
2d0c2eb921
COPYING.md: Update copyright years
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-07 20:03:11 -07:00
Joseph Nuthalapati
b7c3a06e85
featherwiki: Add new app
- Uninstall deletes wikis & extensions

- Use Skylark (v1.8.0)

- Add option to upload existing wiki

- Open wiki links in new tab. Since Feather Wiki modifies browser history, it
takes several clicks to go back and reach the FreedomBox app for Feather Wiki if
the user wants to switch to another wiki file. Opening in a new tab also makes
it easy for the user to move text between wikis (i.e. the Refile use case).

- Improve HTML file path handling. Extract only the HTML file name from the URL.
Return a 404 status if the file cannot be found

- Place featherwiki_nest.cgi file in /usr/lib/cgi-bin. The file is installed as
part of the FreedomBox package, rather than a step in the installation of
Feather Wiki.

[sunil]

- Reorganized description to complete the introduction before talking about
FreedomBox implementation.

- Update description to say that only users of 'wiki' group can access.

- Update description to talk about where the wiki is downloaded from how to
upgrade it.

- Update short description to 'Personal Notebooks'.

- Add UsersAndGroups component and to reuse 'wiki' group properly.

- Reorder component to resemble other apps (could prove useful in future).

- Restrict frontpage shortcut to 'wiki' group users.

- Minor styling updates. Run isort.

- Use pathlib.Path object where possible instead of os.path.

- Perform sanitization in privileged methods instead of callers. This leads
better security if the service is compromised.

- Perform duplicate checking in privileged methods instead of callers.

- Check in privileged action that uploaded file originates from temporary
directory. Otherwise, arbitrary files can moved into DAV directory.

- Switch storage path to /var/lib/ which is an application data folder from
/var/www which is a user data folder.

- Add extra security to the DAV folder by explicitly rejecting .htaccess
directives, forcing mime type and removing all options.

- Update SVG/PNG logo icons to adhere to our guidelines.

- Minor template updates. Add required attributes. Improve i18n. Avoid <p>
  inside <p>.

- Refactor tests for more code reuse and fewer globals.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-07 20:03:10 -07:00
Sunil Mohan Adapa
35bfe86bda
apache: Enable dav and dav_fs modules
- DAV can simplify hosting the Feather Wiki app.

- It can also potentially be used to share folders over HTTP to clients such a
GNOME/KDE file mangers.

- Enabling the modules by default should have few disadvantages other than
slight increase in memory. It needs to be enabled with 'DAV on' directive on the
specific directories.

Tests:

- Running the service after patch run apache setup and the modules are enabled.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-07 20:03:10 -07:00
Sunil Mohan Adapa
7ba559a8a9
base.html: Drop dependency on modernizr.js library
- The library performs a large number of tests to determine if various features
are available in the browser. In Debian most tests seem to be present unlike
other methods of distribution where users select which tests they want and build
a customized library for their app. This leads to increased page load time.

- The only functionality we use from Modernizr library are the .js and .no-js
classes we use in our CSS styling. Modernizr is not needed by Bootstrap library.
We don't use 'Modernizr.' properties in Javascript.

- A bug in the test to determine if an <input> element with type="number" allows
localization or not causes the page to scroll down to the end. This behavior
appeared in version 3.x of modernizr and despite the bug report and the fix, it
is not gone. Dropping modernizr fixes this issue.

Tests:

- The logout link in the header bar is visible only when Javascript is disabled.

- The dropdown icons next to header menus only appear when Javascript is
enabled.

- For each feature detection provided by Modernizr library, search if our
project is using that in CSS styling.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-08-07 23:26:32 +03:00
Sunil Mohan Adapa
9af026c47c
rssbridge: tests: Add missing __init__.py
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-03 09:40:06 -04:00
Sunil Mohan Adapa
07d3eb2cc1
nextcloud: tests: functional: Add base and interface tests
Tests:

- Functional tests work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-03 09:39:16 -04:00
Sunil Mohan Adapa
7c7a0fe14a
nextcloud: Prevent process restart when nextcloud is uninstalled
When an app installs a python module as a dependency and imports it. CherryPy
will start monitoring it for changes. When the app is uninstalled, the module is
removed from the system leading to change detected by CherryPy. The entire
service is then restarted if it is in development mode. This could cause a
temporary failure in requests served leading to failures in functional tests.
Workaround this by preventing auto-reloading for some python modules.

Tests:

- Without changes, in develop mode, uninstall nextcloud and notice that
FreedomBox service is restarted. With changes, it does not restart.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-03 09:38:46 -04:00
Sunil Mohan Adapa
1b95a565b0
nextcloud: Redirect to URL nextcloud/ if ending slash is not given
Tests:

- Without the changes, typing https://<domain>/nextcloud does not work. With the
changes it redirects to https://<domain>/nextcloud/.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-03 09:38:27 -04:00
Sunil Mohan Adapa
66533a1af5
tests: functional: Name the background fixture
For test cases implemented in derived classes, autouse=True does not seem to
work. These test cases can explicitly request this fixture with the name.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-03 09:38:18 -04:00
Sunil Mohan Adapa
ef4292d5fc
tests: functional: Allow submitting form buttons along with inputs
- Sometimes <input type='submit'> are used as submit buttons and at other times
<button type='submit'> is used.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-03 09:38:09 -04:00
Sunil Mohan Adapa
1398501ec4
gitweb: Don't backup/restore a drop-in configuration file
- /etc/gitweb-freedombox.conf is a drop-in configuration file. It is provide in
/usr and linked into /etc/. It is overwritten when freedombox package is
upgraded. So, it is incorrect to backup/restore the file.

Tests:

- Run functional tests that include backup/restore.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-07-31 13:32:42 +03:00
Besnik Bleta
44af0a1c4d
Translated using Weblate (Albanian)
Currently translated at 98.9% (1584 of 1601 strings)
2024-07-31 07:09:39 +02:00
109247019824
32b8db86df
Translated using Weblate (Bulgarian)
Currently translated at 46.2% (741 of 1601 strings)
2024-07-31 07:09:38 +02:00
大王叫我来巡山
6af6c823e5
Translated using Weblate (Chinese (Simplified))
Currently translated at 66.3% (1062 of 1601 strings)
2024-07-31 07:09:36 +02:00
Burak Yavuz
a449310259
Translated using Weblate (Turkish)
Currently translated at 100.0% (1601 of 1601 strings)
2024-07-31 07:09:35 +02:00
gallegonovato
09a83784ff
Translated using Weblate (Spanish)
Currently translated at 100.0% (1601 of 1601 strings)
2024-07-31 07:09:33 +02:00