4073 Commits

Author SHA1 Message Date
James Valleroy
d513900fa5
Release v19.1+deb10u2 to buster
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v19.1+deb10u2
2021-03-30 21:43:47 -04:00
Kirill Schmidt
532aaf1489
first_boot: Use session to verify first boot welcome step
Closes: #2074

sunil's changes:

- Ensure that secret is not asked for a second time after creating admin user
and logging in (this happens due to discarding of old session and creating new
one).

- Ensure that this logic is not applied to user using FreedomBox images who are
not required to input the first wizard secret.

- Change the name of the session variable for readability.

Tests performed:

- Without the patch, start first boot wizard on the first browser on a
  FreedomBox image (or run the file `base64 < /dev/urandom | head -c 16 | sed -e
  's+$+\n+' > /var/lib/plinth/firstboot-wizard-secret`). Finish the welcome step
  with first wizard secret. Then open a second browser or from another computer
  visit the web interface. The first wizard secret is not asked and user can
  create an admin account.

- Repeat with fresh image again with the patch. To mimic fresh image, one may
  run `sudo rm -f /var/lib/plinth/plinth.sqlite3` and `echo "password" | | sudo
  /freedombox/actions/users remove-user tester`. This time when a different
  browser other than the one that provided the first wizard secret try to access
  the account creation page, a redirection will occur to welcome page. Providing
  the first wizard secret takes the user to account creation page.

- Accessing network first wizard page or internal pages on second browser also
  takes one back to the welcome page.

- Accessing help pages from second browser requires login.

- Accessing account login page from second browser is allowed. After creating
  the account from first browser, second browser can login and continue the
  wizard.

- Clearing cookies in the middle of the wizard takes the user back to welcome
  page.

- Clear cookies in the middles of the wizard. Visit the wizard, go to first boot
  welcome page. Provide secret and the wizard will continue where it was left
  off.

- Clear cookies in the middles of the wizard. Visit the wizard, go to first boot
  welcome page. Access login page, login as admin. Then first wizard secret is
  not asked. First wizard can be continued.

- On a fresh image, simply complete the first wizard. No change to earlier flow
  is noticed. First wizard secret is only asked once at the beginning.

- On a fresh image, remove the file /var/lib/plinth/firstboot-wizard-secret.
  First wizard can be completed without the secret.

[sunil: improvements to original patch by Kirill Schmidt]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-03-30 21:07:51 -04:00
James Valleroy
b4b7767de9
Release v19.1+deb10u1 to buster
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-21 21:46:27 -04:00
James Valleroy
18f9bc8c28
apache: Disable mod_status
Prevent leaking private info through Tor onion service or Pagekite.

Based on 822c322d20d12f81c6cfca47b66f900542a5aac2.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-21 21:39:47 -04:00
James Valleroy
7295a6d9cc
Release v19.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v19.1
2019-02-14 06:01:53 -05:00
James Valleroy
28f289b74b
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-14 06:01:08 -05:00
James Valleroy
114bc1f053
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-14 05:48:31 -05:00
Sunil Mohan Adapa
e448ab6380
matrixsynapse: Better checking for valid certificate
If a valid certificate is available but not yet setup, the earlier code assumes
there is a valid certificate.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 19:34:04 -08:00
Sunil Mohan Adapa
b169739867
matrixsnapse: Setup certificate after domain selection
Immediately after the installation, a self-signed certificate is used because
domain name is not available. However, after domain name becomes available,
setup a Let's Encrypt certificate.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 19:00:33 -08:00
Sunil Mohan Adapa
3b257c7a58
matrixsynapse: Fix potential exposure of private key
Setting permissions after copying the file will lead to momentary exposure of
the private key to other users on the system. Use umask instead.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 17:52:49 -08:00
Sunil Mohan Adapa
b53f675f55
matrixsynapse: Don't check for current domain in renew hook
Don't match the hook's domain against domain set in configuration. We already
check if the domain matches the Matrix Synapse configured domain.

- Fix un-checking letsencrypt option for matrixsynapse. Keep the old certificate
  but don't throw error. This means future certificates are not renewed.

- Use utility get_configured_domain_name()

- Style function names without uppercase.

- Style multi-line docstrings correctly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 17:14:08 -08:00
Sunil Mohan Adapa
ee38f32f2b
letencrypt: Fix issue with disabling matrixsynapse checkbox
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 15:40:47 -08:00
Sunil Mohan Adapa
781ac3d5dd
matrixsynapse: Fix issues with showing certificate warning
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 15:40:05 -08:00
Sunil Mohan Adapa
3961ccf415
matrixsynapse: Remove hard-coded URL
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 15:38:45 -08:00
Joseph Nuthalapati
a918f9a885
matrix-synapse: Use Let's Encrypt certificates
Matrix requires valid certificates for federation with other servers from
version 1.0 onward. If the FreedomBox server already has LE cert and private
key, copy them into /etc/matrix-synapse

- Add certificate renewal hooks for Matrix Synapse. Reusing the certificate
  renewal mechanism built for ejabberd with matrix-synapse as well. One notable
  difference is that Matrix Synapse doesn't support switching the domain name or
  dropping the Let's Encrypt certificate.

- Use self-signed certificate if there is no LE certificate. Matrix Synapse
  server startup fails if the files homeserver.tls.crt and homeserver.tls.key
  are missing.

- Copy Apache's snakeoil certificates to /etc/matrix-synapse when LE
  certificates are not available. Prefer LE certificates if available.

- Display warning if no valid LE certificate is found.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-02-13 11:29:36 -08:00
Sunil Mohan Adapa
a821517e91
radicale: Simplify upgrading to newer packages
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-13 06:42:55 -05:00
Sunil Mohan Adapa
920d083301
setup: Add option to handle configuration prompts during install
This is optional and does not affect normal installations. However, when
performing configuration migration in FreedomBox (due to unattended-upgrades
refusing it), it is useful as a part of strategy to read configuration, force
install new configuration files and apply configuration again. This option can
be used on such cases.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-13 06:42:50 -05:00
advocatux
0f5a52f8c4
Translated using Weblate (Spanish)
Currently translated at 100.0% (1018 of 1018 strings)
2019-02-12 13:09:51 +01:00
Petter Reinholdtsen
350fd493d4
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (1018 of 1018 strings)
2019-02-12 13:09:50 +01:00
Allan Nordhøy
4afd103d74
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (1018 of 1018 strings)
2019-02-12 13:09:49 +01:00
Pavel Borecki
3ae36c012b
Translated using Weblate (Czech)
Currently translated at 100.0% (1018 of 1018 strings)
2019-02-12 13:09:49 +01:00
James Valleroy
6536e86b15
radicale: Fix server URLs in client info
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-11 13:56:08 -08:00
James Valleroy
5aa957c6ba
radicale: Remove obsolete diagnostics
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-11 13:56:02 -08:00
James Valleroy
03b935333f
radicale: Bump version to 2
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-11 13:55:56 -08:00
James Valleroy
11e86cf8f8
radicale: Log errors during upgrade
Avoid raising errors which could cause endless loop of setup process
failing.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-11 13:55:25 -08:00
James Valleroy
97f603e998
Release v19.0 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v19.0
2019-02-09 20:38:17 -05:00
James Valleroy
ffae80b5cf
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 20:34:56 -05:00
James Valleroy
175aa3f9b7
locale: Update strings for translation
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 20:14:51 -05:00
Sunil Mohan Adapa
67451248eb
upgrades: Fix premature adding of buster-backports sources
It is incorrect to check for backports availability, FreedomBox systems got
added buster-backports sources prematurely. This will lead to apt update
failures resulting in FreedomBox becoming unable to install new apps.

Fix this by removing old sources and adding new sources only after
performing (this time correct) backports URL check.

Closes: #1496.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 19:36:03 -05:00
Sunil Mohan Adapa
e2f2d337c7
upgrades: Fix priority for buster-backports version
If we release version 50 into testing and version 49 into buster-backports and
assuming version 45 is in stable, then for stable users, version 49 is selected
properly and upgraded due non-availability of 50 for them and high
prioritization of buster-backports over buster/stable. This is as expected.

For the case of testing user, this does not work as expected, however.
buster-backports will be given 800 priority, testing will be given 500
priority (default) and version 49 will be picked instead of the expected 50.

Setting priority to 500 fixes the problem. It will equate the buster-backports
to all other repositories and will let the system pick the highest version
available.

Closes: #1498.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 19:36:00 -05:00
Sunil Mohan Adapa
9d44b09fd4
action_utils: Fix checking for URL availability
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 19:35:57 -05:00
Sunil Mohan Adapa
91f68cc7b5
mldonkey: Enable app
- Problems with stopping the daemon have been solved.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 13:31:59 -05:00
Sunil Mohan Adapa
2b45a8cff9
mldonkey: Add systemd service file with security options
- This solves the problem with init that causes the daemon not to stop.

- The file is installed with same name as init script so as to make sure init
  script become overridden.

- It is installed in /lib/systemd/system/mldonkey-server.service.d/ so
  that this service file can one day be upstreamed and at that time it
  does not conflict with freedombox package carrying the same file.

- Add strict security options.

- Tested by watching mldonkey logs, doing some searching and downloading from
  the UI.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 13:31:51 -05:00
advocatux
95fddde90f
Translated using Weblate (Spanish)
Currently translated at 100.0% (1015 of 1015 strings)
2019-02-09 19:09:41 +01:00
Johannes Keyser
5b4fbf81cc
Translated using Weblate (German)
Currently translated at 100.0% (1015 of 1015 strings)
2019-02-09 19:09:40 +01:00
Pavel Borecki
73358926e4
Translated using Weblate (Czech)
Currently translated at 100.0% (1015 of 1015 strings)
2019-02-09 19:09:39 +01:00
Sunil Mohan Adapa
ab64bd17a3
apache: Switch to mod_ssl from mod_gnutls
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 12:28:09 -05:00
Sunil Mohan Adapa
e36a4b85ee
apache: Add support for mod_ssl in addition to mod_gnutls
Depending on which module is enabled, different configuration is used.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 12:28:06 -05:00
Sunil Mohan Adapa
511f5c09c0
apache: Cleanup domain configuration
- Don't set log level explicitly. Fallback to value set in global Apache
  configuration.

- Don't set directory options already set in global configuration.

- Remove /cgi-bin/. Only ikiwiki uses cgi and it is served from a different path
  than /usr/lib/cgi-bin.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 12:28:03 -05:00
Sunil Mohan Adapa
f9a57e4293
monkeysphere: Fix regression with reading new apache domain config
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 12:28:01 -05:00
Sunil Mohan Adapa
49640fdfce
monkeysphere: Fix handling of multiple domains and keys
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 12:27:57 -05:00
J. Carlos Romero
722fa39c2a
mldonkey: Add to the description the three available front-ends
Signed-off-by: J. Carlos Romero <juancarlos.romero@gmail.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-07 22:05:06 -08:00
J. Carlos Romero
59e41927bf
mldonkey: Add some more clients to the module page
Signed-off-by: J. Carlos Romero <juancarlos.romero@gmail.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-07 22:05:03 -08:00
James Valleroy
18309d7cb8
Release v0.49.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v0.49.1
2019-02-07 21:31:03 -05:00
James Valleroy
54359c84df
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 21:23:00 -05:00
James Valleroy
be148ab7c3
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 20:57:52 -05:00
James Valleroy
779ccb3bca
datetime: Switch from chrony to systemd-timesyncd
Previously, we switched from ntp to chrony. However, since chrony
conflicts with ntp, this change in dependency causes
unattended-upgrades to skip upgrading freedombox.

Switch to systemd-timesyncd, which does not conflict with either
package. We can switch back to chrony after all users have upgraded to
the most recent release.

Closes #1486

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-07 16:32:35 -08:00
Sunil Mohan Adapa
2e112d751c
backups: Minor styling fixes
- Ran yapf

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:12:12 -05:00
Sunil Mohan Adapa
5e38b169b9
backups: Increase timeout for SSH operations to 30 seconds
It is easy to run into cases where SSH mounting takes more than 5 seconds.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:12:08 -05:00
Sunil Mohan Adapa
6e188524e2
backups: Fix styling for upload size warning
Make it conditional such that when the disk space information is not available
due to errors, we don't display the warning.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:12:06 -05:00