2735 Commits

Author SHA1 Message Date
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
7295a6d9cc
Release v19.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-14 06:01:53 -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
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>
2019-02-09 20:38:17 -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
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
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
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>
2019-02-07 21:31:03 -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
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
Sunil Mohan Adapa
ff8d85a88f
backups: Add link to manual page
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:12:04 -05:00
Sunil Mohan Adapa
f15505e6f4
backups: Add title and description to other pages
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:12:02 -05:00
Sunil Mohan Adapa
3be15a87e6
backups: Move subsubmenu below description
Closes: #1466.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:11:59 -05:00
Sunil Mohan Adapa
8da5b21d80
backups: Use icon for add repository button
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:11:57 -05:00
Sunil Mohan Adapa
d99c356336
backups: Rename 'Abort' buttons to 'Cancel'
Like most other pages in the interface, use 'Cancel' buttons instead of 'Abort'
buttons.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:11:53 -05:00
Joseph Nuthalapati
df978ce8ee
letsencrypt: UI: Fix checkbox disabling
Disable checkboxes using HTML attribute instead of CSS class

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-07 15:23:01 -08:00
advocatux
0564dc558b
Translated using Weblate (Spanish)
Currently translated at 100.0% (1018 of 1018 strings)
2019-02-07 15:09:41 +01:00
Petter Reinholdtsen
eb99e82fc5
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (1018 of 1018 strings)
2019-02-07 15:09:39 +01:00
Pavel Borecki
9dda809b24
Translated using Weblate (Czech)
Currently translated at 100.0% (1018 of 1018 strings)
2019-02-07 15:09:38 +01:00
Sunil Mohan Adapa
8e5d8da89c
ui: Fix regression with configure button in home page
Closes: #1488.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 07:49:32 -05:00
James Valleroy
8a54c2397c
Release v0.49.0 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-05 22:56:17 -05:00
James Valleroy
2371442292
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-05 22:21:32 -05:00
Petter Reinholdtsen
97266e7511
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (1018 of 1018 strings)
2019-02-06 04:19:02 +01:00
danielwine
2ae479c17d
Translated using Weblate (Hungarian)
Currently translated at 90.9% (925 of 1018 strings)
2019-02-06 04:19:01 +01:00
Sunil Mohan Adapa
3173c70743
datetime: Fix diagnostic test to not ignore first two servers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-05 15:39:22 -08:00
James Valleroy
2c7d1a09c1
datetime: Switch from ntp to chrony
Use the default config, which only runs as client.

Fixes #971

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-05 15:21:31 -08:00
Sunil Mohan Adapa
5a159f7d39
upgrades: Improve handling of backports
- Merge backports functionality into upgrades module.

- No need to enable systemd timer as dh_installsystemd automatically enables
  this during package installation and upgrade.

- Use https:// and deb.debian.org for repository checking. When using Tor for
  package installations request the URL via Tor.

- Make daily checking service more generic for all kind of future apt repository
  updates.

- Force removal of repository file during purge to avoid failures.

- Don't add contrib/non-free as backports is intended to be enabled for just the
  freedombox package and it is free. When the need arises, we can introduce
  contrib/non-free. This also eliminates an issue that adding these components
  doesn't work without the usage of tor.

- Allow generate apt preferences file to avoid lintian complaining about its
  presence. Remove on purge.

- Add unattended upgrades origin pattern to allow it to upgrade from backports
  repositories.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-05 14:58:55 -08:00
Sunil Mohan Adapa
c0de223ae4
action_utils: Expose URL checking utility for generic use
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-05 14:58:52 -08:00