1690 Commits

Author SHA1 Message Date
Veiko Aasa
dbdd482e61
samba: fixes and improvements
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 11:30:35 -05:00
Veiko Aasa
598bcb6fbb
samba: user can select devices for sharing
- show share also if a device is not available
 - use folder Freedombox/shares/open_share for sharing on every disk
 - backup and restore share definitions
 - fix: do not hide status block
 - fix: add nmbd to the managed services

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 11:30:31 -05:00
Veiko Aasa
eaaa764387
samba: Users can enable a guest share
Related to  #1681

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 11:30:25 -05:00
Joseph Nuthalapati
005e9ffbd8
openvpn: Add client apps
Closes #1702

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-30 12:21:56 -05:00
Veiko Aasa
126f0a793e
matrix-synapse: Update requirement from buster-backports
matrix-synapse >= 1.5 requires python3-typing-extensions >= 3.7.4

Closes #1720

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-30 07:55:10 -05:00
Alice Kile
4969efd3b9
apps: Remove link to webapps in app descriptions
[sunil: Fix trailing white space in description]
[sunil: Fix removal of wrong message from ttrss app]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-26 15:39:28 -08:00
Veiko Aasa
ee03357f65
diagnostics: fix IPv6 failures
- Curl: if an IPv6 zone index is specified, use --interface parameter.
  This fixes two issues:
  - Curl in Debian Buster doesn't support an IPv6 zone index in URL
  - Curl in Debian Bullseye doesn't redirect properly if a zone index is in URL.
- Disable IPv6 diagnostics on daemons that don't listen on an IPv6 address:
  plinth, deluge, transmission

Closes #1519

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-25 20:10:48 +05:30
Alice Kile
f9c9c62837
diagnostics: don't run on disabled modules
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-25 19:30:30 +05:30
Matt Conroy
01bf96be4c
openvpn: manual link points to incorrect page
Fixed issue #1701. Removed the hyperlink in the profile section
per Joseph's suggestion and modified the paragraph to tell the
user to click learn more since it has the correct link.

Signed-off-by: Matt Conroy <matt@mattconroy.net>

Fixes #1701
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-25 19:22:16 +05:30
Veiko Aasa
6649ead854
ssh: fix Avahi SFTP service file
- Remove user fbx from Avahi SFTP service file
- Use more precise service name

Closes #1689

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-21 19:51:50 -05:00
Alice Kile
88b8ff3d62
backups: fix title not appearing
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-21 20:07:40 +05:30
Joseph Nuthalapati
5b2df956e8
pagekite: Use the new app toggle button
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-20 06:26:54 +05:30
Joseph Nuthalapati
71ccb5882b
pagekite: Make Custom Services look like it's under Configuration
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-20 05:55:21 +05:30
Joseph Nuthalapati
c2412621b3
pagekite: Show existing services only if there are any
Reduces visual noise on the page.

Some formatting changes

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-20 05:03:07 +05:30
Matt Conroy
bdb090e386
pagekite: Get rid of tabs in the configuration page
Made the changes requested in issue #1693 to the pagekite
configuration page. Removed the tabs and the javascript.
Made a sort of hacky but working solution to always having
the standard pagekite services being enabled. Put custom
services configuration below the regular configuration and
added a separate add custom service page a la the Gitweb
page.

Fixed formatting issues.

Signed-off-by: Matt Conroy <matt@mattconroy.net>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-20 04:58:03 +05:30
Joseph Nuthalapati
815d3ec0e8
firstboot: reading firstboot-wizard-secret file
Explain how to read the firstboot-wizard-secret file using shell
commands. Remove output of the cat command.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-18 18:10:24 -05:00
Alice Kile
1a65c88881
app: Use single form for app toggle and configuration
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-19 00:02:16 +05:30
Alice Kile
8e3bbdb089
clients: implement launch button feature
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-18 19:41:14 +05:30
Sunil Mohan Adapa
ebe6a0ed02
tor: Listen on IPv6 for OrPort
- Fix regex for reading OrPort value from command port communication.

- Setup all new configurations for listening on IPv6 for OrPort.

- Upgrade existing configuration for listening on IPv6 for OrPort. Increment app
  version number force run setup again.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-15 20:14:49 -05:00
Sunil Mohan Adapa
ca9047104a
tor: Expect obfs service to be also available on IPv6
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-15 20:14:46 -05:00
Sunil Mohan Adapa
dcdd6a0988
tor: Fix port diagnostics by correcting port data type
Helps #472.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-15 20:14:44 -05:00
Veiko Aasa
955da6bee8
turbolinks: Disable turbolinks on links that don't point to /plinth/...
Fixes #1678

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-14 08:14:49 +05:30
Birger Schacht
47261ae79a
tor: Rename "Hidden Service" to "Onion Service"
Upstream does not use the term "Hidden Service" anymore.
https://2019.www.torproject.org/docs/onion-services.html.en

Closes #1624

Signed-off-by: Birger Schacht <birger@rantanplan.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-11 22:13:35 +05:30
Joseph Nuthalapati
cd1e7b649d
tahoe: Mark Tahoe-LAFS as an advanced app
Tahoe LAFS is an app requiring some technical knowledge to use and its support
in FreedomBox is experimental. The use case of a cluster of FreedomBoxes running
Tahoe-LAFS nodes isn't tested yet. It's intended use case as a backend for the
backups app isn't implemented yet.

- Fixed functional test implementation for advanced mode
- Did not fix failing Tahoe-LAFS tests, keeping them skipped for now.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-08 13:58:55 -08:00
Sunil Mohan Adapa
8e341a6c3b
backups: Simplify SSH fingerprint verification command
There is no need to access the private key of an SSH host to get it's public key
fingerprint. Use public key file instead. No need for 'sudo' privileges because
of this any non-admin users can also do this verification.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-08 22:42:42 +05:30
Sunil Mohan Adapa
a5d9736abc
backups: i18n for a string on verify ssh host page
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-08 22:42:24 +05:30
Joseph Nuthalapati
baa5a12c62
ejabberd: Handle case where domain name is not set
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-07 15:35:34 -08:00
Veiko Aasa
aaee9ec8a9
gitweb: Do not recursively scan for Git repositories
Temporary directories are now hidden when cloning remote repositories.

Fixes #1677

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-07 15:00:24 -08:00
Birger Schacht
7eb6d23e83
ssh: Add the error of ssh-keyscan to the verification view
This commit takes the stderr of `ssh-keyscan` (in case of a returncode thats not
zero) and stores it as as string in the form object. The view then displays the
information as preformatted text in a warning class.

Signed-off-by: Birger Schacht <birger@rantanplan.org>
[sunil: Cosmetic: variable name change for consistent naming]
[sunil: <pre> can't be inside <p>, keep it out]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-07 14:25:30 -08:00
Birger Schacht
25bcee6488
backups: Show proper error when SSH server is not reachable
The backup module is connecting to the remote backup host using ssh-keyscan to
get a list of SSH public keys. When the connection fails, the form should inform
the user that there was a problem, instead of simply not listing any SSH public
keys.

Closes: #1656.

Signed-off-by: Birger Schacht <birger@rantanplan.org>
[sunil: Minor indentation]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-07 14:25:26 -08:00
Veiko Aasa
c99b33b40e
gitweb: Allow to import from a remote repository
- Allow to enter either name or URL when creating repository

- Validate a repository URL, allow only http and https schemes

- Set autocomplete off on the name/URL field because URL may contain
  username:password

- Check whether the repository actually exists before cloning

- Show progress info while cloning

- Actions script: new subcommand check-repo-exists and new arguments
  for the create-repo: --url, --prepare-only and --skip-prepare

- Add test for invalid URLs

Closes #1670

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil: Fix validating repo name in edit form]
[sunil: Don't pipe stdin of clone process, it may lead to a hang]
[sunil: Always run clone process with 'C' locale since we are parsing output]
[sunil: Cosmetic changes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-04 21:16:30 -08:00
James Valleroy
17cafd9594
coquelicot: Change quotes to ASCII
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-04 18:33:46 -05:00
Veiko Aasa
2c999899ea
sharing: Fix wrong links on Apache2 directory index page
For example, when visiting '/share/myshare' then shared test.txt file links
to a wrong url /share/text.txt, it should be /share/myshare/text.txt.

This is related to #1676

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-04 12:23:20 -08:00
James Valleroy
b338501778
config: Implement get_initial and form_valid
Fixes #1675.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-04 11:30:38 -08:00
Sunil Mohan Adapa
121c1cf4ca
help: Fix showing manual pages in fallback cases
- When a manual page for a certain language is not found, redirect to 'en' for
  that manual page. Simply showing English content will cause issues with
  serving images.

- Don't use language preferences unless the URL language is not generic. The
  language of the page shown will always correspond to the language in the URL.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:15 -04:00
Joseph Nuthalapati
eb91938963
help: Respect language preference when showing user manual
Retrieve the manual page or download PDF manual in user's preferred language.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Merge URL format since view is the same]
[sunil@medhas.org Refactor language extraction]
[sunil@medhas.org Minor refactorings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:06 -04:00
Sunil Mohan Adapa
6a6983f39e
storage: Use AppView and cleanup custom code
- Follow common code so that extending becomes easier.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:43 -04:00
Sunil Mohan Adapa
dd1884e8ab
config: Use AppView and cleanup custom code
- Follow common code so that extending becomes easier.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:40 -04:00
Joseph Nuthalapati
62115dcd1e
infinoted: Add missing manual page link
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:36 -04:00
Sunil Mohan Adapa
92a5a11659
ssh: Fix flake8 failure by removing unused import
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-29 15:28:23 -07:00
Nektarios Katakis
ddb95752a8
ssh: Option for disabling password authentication
Closes: #572

[sunil: Reload instead of restart, fix i18n strings]
[sunil: Load augeas minimally, minor cosmetic fixes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-29 14:50:46 -07:00
Veiko Aasa
ba9869c030
gitweb: Validate repository name also in actions script
This prevents writing to an arbitrary directory if running actions script
as a root user.

- Included tests for invalid names

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil@medhas.org Parametrize the test case]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-28 11:22:20 -07:00
Veiko Aasa
0b2d1265cb
gitweb: fix links that end with /HEAD
On the Gitweb site, links that end with /HEAD (for example menu links after
selecting 'tree' on the front page) are mistakenly redirected
to the git-http-backend cgi script and an empty page is shown to the user.

Modified Apache2 ScriptAliasMatch regex so that git-http-backend services get
redirected only if they immediately follow repository's name path component.
Links on Gitweb site have additional action component before /HEAD and those
will be handled by the gitweb cgi script.

The relevant git-http-backend source:
https://repo.or.cz/git/debian.git/blob/refs/tags/v2.20.1:/http-backend.c#l706

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-27 18:04:30 -07:00
Veiko Aasa
ea01ef6f80
gitweb: avoid global environment variables in Apache configuration
Closes #1671

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-27 12:07:22 -07:00
Sunil Mohan Adapa
ef5c2ab908
gitweb: Set proper access after restoration of a backup
Otherwise, if the backup contains public repos and state before backup is all
private repos, then gitweb interface is not available publicly after restore.
Similar case happens when all restore repos are private and state before that
contains a public repos.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-27 00:33:08 -07:00
Veiko Aasa
8694849701
gitweb: Add functional tests
- add eleven functional tests
- gitweb_configure.html template: add id to the repository list element
  to distinct it better.

Closes #1668

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 23:48:56 -07:00
Veiko Aasa
c8eb5bb3ca
gitweb: Add tests for actions script
- add tests for create, edit and delete repository functions
- modify actions script to allow run actions without root privileges:
  - add argument --git-repo-root to overwrite the default root directory
    of repositories
  - add option --keep-ownership to the create-repo command to skip
    changing ownership to www-data
- actions script, repo-info command: instead of returning empty values,
  raise an error if the repository doesn't exist

Closes #1667

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil@medhas.org Remove unneeded #! directive]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 21:27:28 -07:00
Thomas Vincent
314e30d034
backups: Fix a typo in backups upload form
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-26 17:55:21 -07:00
Veiko Aasa
7c5837a13a
gitweb: Set correct access rights after enabling application
- after enabling application, do not enable Apache auth configuration
  if a public repository exist.

Closes #1669

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-22 11:44:49 -07:00
Matthias Dellweg
ebd3af340c
quassel: Add let's encrypt component for certficiates
Signed-off-by: Matthias Dellweg <2500@gmx.de>
[sunil@medhas.org Implement set domain as superuser action to make it succeed]
[sunil@medhas.org Minor cosmetic changes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-21 12:09:13 -07:00