108 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
2467d6a033
middleware: Implement middleware for common headers such as CSP
- This allows overriding these headers in individual pages easily instead of
relaxing global policy.

- Drop the obsolete CSP directive "block-all-mixed-content" and avoid a console
warning in Firefox.

Tests:

- Load a page and notice in the browser developer tools that the three headers
referrer-policy, content-security-policy, and x-content-type-options are set as
before.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-11-17 13:02:52 -05:00
Joseph Nuthalapati
38810e566b
apache: Make all directory listings more mobile friendly
Closes #2256.

Based on a suggestion by Andrew Betts on the mailing list.
https://alioth-lists.debian.net/pipermail/freedombox-discuss/2022-August/009553.html

Sunil:

- Consolidate changes from various apps into a centralized place in
freedombox.conf applicable for all directory listings.

Tests:

- In Sharing, TiddlyWiki and FeatherWiki apps, directory listing when viewed
with Firefox Developer Tools Mobile view set to a Galaxy S20+ looks reasonable.
Without the patch the page is very zoomed out.

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>
2025-07-18 16:32:41 -07:00
Sunil Mohan Adapa
298bb5ae58
config: Allow better Apache default home page
- Don't redirect to '/index.html' when Apache Default is set as the home page.
This allows having other files such as 'index.php' as index file in
/var/www/html/.

- If the home page is currently set to 'Apache Default' upgrade the
configuration.

Tests:

- With Home page set to 'Apache Default' apply the patches. Config setup is
re-run. The configuration file becomes empty but is still present. Correctly
value is shown in the UI. /var/www/html/index.html is still shown as the home
page.

- With Home page set to 'Bepasty' apply the patches. Config setup is re-reun.
The configuration file is not modified. Bepasty is still shown as the home page.
Correctly value is shown in the UI.

- With Home page not modified apply the patches. Config setup is re-reun. The
configuration file is created. FreedomBox is the home page. Correctly value is
shown in the UI.

- On fresh machine with patches applied, perform first run. The configuration
file is not created. FreedomBox is the home page. Correctly value is shown in
the UI.

- Changing home page to Bepasty or 'Apache Default' works. Changing back to
'FreedomBox Service (Plinth)' also works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:50 -04:00
Sunil Mohan Adapa
0fa1dcf902
apache: Generalize TLS config to use certificates only if available
- This allows TLS configuration to setup for domains that haven't yet
successfully obtained certificates yet.

Tests:

- Apply the patch on a production configuration and ensure that LE certificates
are properly used.

- With full pathset applied, on a test container, add a domain and ensure that
domain has its own site configuration and uses the snake-oil certificate.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:38 -04:00
Sunil Mohan Adapa
8401b08357
apache: Allow customization to the root of a site
Tests:

- After a domain is added and a TLS configuration for the site is created,
creating each of the 4 files leads to customization for that domain. In case of
last two files, only the domain is effected.
  - /etc/apache2/includes/all-domains-include-freedombox.conf
  - /etc/apache2/includes/all-domains-include.conf
  - /etc/apache2/includes/$domain-include-freedombox.conf
  - /etc/apache2/includes/$domain-include.conf

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:36 -04:00
Sunil Mohan Adapa
f04c1c18c1
apache: Relax content security policy to allow data: URL
- Needed for many inline SVG images included by Bootstrap 5 using data: URLs.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:32:57 +02:00
Sunil Mohan Adapa
d38f787a42
apache2: Allow popups to have different sandbox policy
- Without this change when opening popups, Firefox throws the error 'Blocked
Page' under certain conditions.

- Complete a comment that was seemingly left unfinished.

Tests:

- With the changes installed with 'make build install', opening popups with
<a target="_blank"></a> works without 'Blocked page' error.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-08 13:44:46 +03:00
Sunil Mohan Adapa
72d7a05ead
apache: Fix logs still going into /var/log files
Closes: #2264.

- Set apache-auth fail2ban jail's backend to read from journal instead of
syslog. Tweak the regex matching to deal with the custom format.

- Adjust the apache error log format to remove unnecessary timestamp. It causes
problems for fail2ban regex matching.

- There was an error in the earlier patch the make apache log into journald.
Configuration for TLS sites still contained ErrorLog and CustomLog directives.
Remove them.

- There is also file with CustomLog directive that logs for other vhosts.

- For some reason, for custom error log format, %T - thread ID did not work and
had to switch to %{g}T global thread ID.

- Added journalmatch to improve performance by matching the regular expressions
against only specific journal entries.

Tests:

- In a container, apply the patch, run setup and start FreedomBox. Apache app is
updated to new version. Apache web server is reloaded. The
other-vhosts-access-log configuration is disabled.

- On a production machine, remove the directives in
freedombox-tls-site-macro.conf and disabling other-vhosts-access-log stopped the
logging into /var/log/apache2/ directory.

- Use TTRSS /tt-rss-app/ URL and type wrong credentials for 10 times. The client
is banned for 10 minutes. Repeat after unban. Client is banned again.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-09 08:53:46 -04:00
Sunil Mohan Adapa
bf1ed7d064
apache: Redirect all logs to systemd journal
- Redirect with separate identifiers so that they can retrieved separately.

- Enable virtual host log format that include name of the domain accessed so
that that information is preserved.

- There is no need to increment the apache app's version number as it has been
incremented earlier in the patch series (for this release).

Tests:

- In a fresh container, setup succeeds. Default apache sites 000-default.conf
and default-ssl.conf are disabled. freedombox-default.conf is enabled. Apache
access logs and error logs are sent to systemd journal.

- Without the patch applied, create a container. Run setup and access Plinth
interface. Apply the patches. Apache setup is run. a2query -s default and
a2query -s 000-default show that sites are not enabled. a2query -s
freedombox-default shows that site is enabled. Apache access logs and error logs
are sent to systemd journal.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-17 12:07:55 -04:00
Sunil Mohan Adapa
d6131df6a8
apache: Also configure to serve on /freedombox
This is useful mostly for future when we may switch from /plinth to /freedombox.

Tests:

- Accessing /freedombox/app/transmission works. Although redirects generated by
the FreedomBox web service still redirect to /plinth. For example, redirection
after logout and auto-redirection to login page.

- Accessing pages of FreedomBox works as usual on /plinth and /freedombox.
Content-Security-Policy is set.

- Accessing /foo/plinth/app/transmission throws 404.

- Accessing http:// redirects to https:// for /plinth and /freedombox.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-17 12:07:55 -04:00
Sunil Mohan Adapa
f8f7dd22b5
apache: Merge old configuration files into a better location
- It is simpler to keep all the configuration in a single file. Any overrides
are expected to be done by writing additional configuration files with higher
priority.

- /etc/apache2/site-available/ is typically reserved for virtual host
configurations. Redirections and proxying for all virtual hosts rather belongs
in /etc/apache2/conf-available/.

- This looses the option of disabling plinth-ssl.conf when needed. In the
initial days of enabling TLS, there was a need felt to keep the option of easily
disabling redirection to TLS in case there is a need for it. However, TLS
certificate setup is mature and the limitations are well understood. There is no
longer a need for it. It still may be possible to avoid the redirection with an
additional configuration.

Tests:

- In a fresh container, setup succeeds. Redirecting to https:// for /plinth
works. FreedomBox web interface is available.

- Without the patch applied created a container. Run setup and access Plinth
interface. Apply the patches. Apache setup is run. a2query -s plinth and a2query
-s plinth-ssl show that sites are not enabled. Redirecting to https:// for
/plinth works. FreedomBox web interface is available.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-17 12:07:55 -04:00
Sunil Mohan Adapa
4fc1844d89
apache: Don't set HSTS for .onion domain
Fixes: #2174.

When HSTS is set, there is no way to override the certificate warnings. LE does
not yet issue certificates for .onion domains. Certificate warnings are
certainly show there. Although browsers don't accept HSTS headers when the
certificate is invalid, it is best be safe and not set them for .onion domains.

Tests:

- Without the patch, on normal and .onion domains, HSTS is set only when using
HTTPS.

- With the patch, HSTS is set only when using HTTPS but only for normal domains
but not .onion domains.

- The patch works when tested with .onion and .ONION hosts.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-01-30 17:00:54 -05:00
Benedek Nagy
e7399a4d8e
apache: Don't redirect to HTTPS for .onion domains
Tests:

- Without the patch, run torsocks curl -kv http://DOMAIN.onion. Observe that
redirection to https happens.

- Without the patch, run curl -kv http://localhost. Observe that redirection to
https happens.

- With the patch, run torsocks curl -kv http://DOMAIN.onion. Observe that
redirection to https does not happen.

- With the patch, run curl -kv http://localhost. Observe that redirection to
https happens.

[sunil: Perform case insensitive match]
[sunil: Remove capture of domain name match]
[sunil: Strictly check that domain ends with .onion]
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>
2022-01-20 15:26:59 -08:00
Sunil Mohan Adapa
ae541ca752
apache: Setup Mozilla recommended configuration
- TLS configuration as recommended by Mozilla's SSL Configuration Generator with
'Intermediate' configuration. See:
https://wiki.mozilla.org/Security/Server_Side_TLS

- Disable ciphers that are weak or without forward secrecy.

- Allow client to choose ciphers as they will know best if they have support for
hardware-accelerated AES.

- TLS session tickets (RFC 5077) require restarting web server with an
appropriate frequency. See:
https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslsessiontickets

- Send OCSP responses to the client and reduce their round trips.

- No need to increment apache app version number as it has already been
incremented in this release cycle for enabling HTTP/2 module.

Tests:

- FreedomBox interface is reachable with the changes.

- ssllabs.com gives an A+ rating on a server with these changes.

  - All ciphers are shown as secure.

  - Forward Secrecy rating is ROBUST.

  - OCSP stapling shows as enabled.

  - Client support seems to match the expected after dropping <= TLS1.1.

  - Session resumption with tickets shows as disabled.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-11 14:31:34 -04:00
Sunil Mohan Adapa
e8c4e732ea
apache: Drop support for GnuTLS
- We have switched to mod_ssl long time ago and are no longer using mod_gnutls.

- It is additional effort configure and test mod_gnutls.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-11 14:31:27 -04:00
Joseph Nuthalapati
956b17da06
apache: Drop support for SSLv3, TLSv1 and TLSv1.1
- As recommended by Mozilla SSL Configuration Generator for 'intermediate'
compatibility configuration: https://ssl-config.mozilla.org/

- As recommended by IETF RFC 7525:
https://datatracker.ietf.org/doc/html/rfc7525#section-3.1.1

- As recommended by NIST: Guidelines for the Selection, Configuration, and Use
of Transport Layer Security (TLS) Implementations:
https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-52r2.pdf

- The following are now the client version requirements for FreedomBox web
interface: Firefox: 27, Android: 4.4.2, Chrome: 31, Edge: 12, IE: 11 (Win7),
Java: 8u31, OpenSSL: 1.0.1, Opera: 20, Safari: 9

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Drop SSLv2, it is not valid anymore as per Apache manual]
[sunil: More detailed commit message and comments]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-01 18:11:20 -07:00
Sunil Mohan Adapa
1cf0748a49
apache2: Allow downloads in openvpn and backups with latest browsers
Closes: #2002.

Entire FreedomBox UI is served within a sandbox that is originally meant for
cross-site iframes.

A newly introduced flag allow-downloads is required to trigger downloads. Two
instances where this is used in FreedomBox is openvpn profiled download and
backup download. Firefox 81 and Chrome 83 implement this flag.

Add 'allow-downloads' to sandbox directives to fix this.

References:

- https://github.com/whatwg/html/pull/4293
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
- https://bugzilla.mozilla.org/show_bug.cgi?id=1558394
- https://www.chromestatus.com/feature/5706745674465280

Tests:

- Check that OpenVPN profile can be downloaded.
- Check that backups can be downloaded.
- Check on Firefox 78 and Chromium 83.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-01-02 13:52:59 +02:00
Sunil Mohan Adapa
6574ec2d44
apache2: Disallow all inline styling in sandbox settings
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-12-19 16:26:54 +02:00
Sunil Mohan Adapa
8ab551f285
apache: Relax CSP to allow web workers for JSXC
Closes: #1893.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 23:31:03 +03:00
Sunil Mohan Adapa
110ec7d744
apache: Set CSP and other common security headers
Tests performed:

- Fonts Lato is properly and displayed.

- No <frame>, <iframe>, <video>, <audio>, <track>, <embed>, <object>, <applet>
tags are used in FreedomBox source code.

- Checked that there are no images referring to external URLs. Most of the
common images such as apps lists, system list, networks and manual show images
properly.

- Styles specified in main.css work as well as page specific styles such as in
networks. Firefox developer console shows inline styles loaded.

- JSXC is able to make XHR requests to ejabberd.

- Able to launch <a> links with _target='blank' such as in /help/support/.

- When visiting external websites, such as in donate page, Referer header is not
sent. When visiting page within FreedomBox interface, Referer header is sent
with path.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 10:09:36 +03:00
Sunil Mohan Adapa
c35938e180
apache: Serve SVG files compressed using gzip
- SVG is not one of the formats for which compress is turned on automatically by
  Apache configuration.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-05-16 06:42:01 -04:00
Sunil Mohan Adapa
ff247fa5aa
setup: Move app data files into respective apps
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-17 16:20:57 -04:00
Joseph Nuthalapati
530423d490
config: Revert changes in freedombox.conf to avoid conffile prompt
The changes made to freedombox.conf in moving the apache homepage configuration
to an external file freedombox-apache-homepage.conf will cause a conffile prompt
when upgrading to freedombox 19.2. Reverting changes in freedombox.conf to avoid
this.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 13:22:32 -08:00
Joseph Nuthalapati
bd43ed515e
config: Remove Apache home page configuration from freedombox.conf
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:31:05 -05:00
Joseph Nuthalapati
8bc34f84c3
config: Rename Default App to Webserver Home Page
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:30:59 -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
dfd46281c5
Serve default favicon for apps that don't provide one
Based on: https://salsa.debian.org/freedombox-team/plinth/merge_requests/1306

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-26 20:23:16 -08:00
Sunil Mohan Adapa
260dcd4d32
mldonkey: Update description and minor updates
- Update description to simply and talk about multiple protocols supported.

- Don't diagnose on IPv6 as mldonkey does not listen there.

- Run yapf and isort.

- Minor styling fixes.

- Update functional tests to check for service running.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-25 14:39:31 -08:00
J. Carlos Romero
548c6b98f3
mldonkey: Add new module for the eDonkey network
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-25 14:39:10 -08:00
James Valleroy
72b59c0190
radicale: Switch to uwsgi for radicale 2.x
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-14 19:51:21 -05:00
Sunil Mohan Adapa
8dbf73d3f5
syncthing: Use exact matches when enforcing trailing '/'
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-06 17:58:10 -05:00
Sunil Mohan Adapa
7cf279ccd0
radicale: Redirect to well-known URLs according to version
- Radicale 1 needs to have /radicale/.well-known/*dav to the URLs where as
  Radicale 2 needs to have /radicale to be the URLs. Hence have two separate
  apache configuration files.

- Use expr= when setting X-REMOTE-USER header to set the authenticated user name
  properly. Without this all users are using a single user '(null)' data.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-06 17:58:00 -05:00
James Valleroy
49acfa5ad1
radicale: Add support for radicale 2.x
- Remove obsolete base_prefix and well-known configs.
- Use http_x_remote_user auth type.
- Rewrite /radicale to /radicale/.
- Add ProxyPassReverse.
- Set X-Script-Name and X-Remote-User request headers.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-06 17:57:56 -05:00
Sunil Mohan Adapa
f1d475bb4e
letsencrypt: Remove outdated Apache configuration
No need to have explicit configuration to allow all requests. This is the
default.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-26 09:20:16 -05:00
Sunil Mohan Adapa
91ba56e3ce
letsencrypt: Use macros for configuring sites
Makes it trivial to alter site configuration for all domains at once. Also
possible to easily switch to TLS modules other than mod_gnutls.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-26 09:20:05 -05:00
Sunil Mohan Adapa
a48471680d
sso: Update outdated Apache configuration
Use Require instead of Deny directive.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-26 09:19:56 -05:00
Sunil Mohan Adapa
5076488c7f
searx: Update outdated Apache configuration
- Avoid Satisfy and Allow which are deprecated.

- Make sure the redirection rule applies only to the URL intended.

- Fix issue with Proxy matching of URLs.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-26 09:19:41 -05:00
Joseph Nuthalapati
9e4fb5eb59
apache: Switch to php-fpm from mod_php
Also try to automatically work for future versions of PHP.

Fixes #1413
Fixes #1258

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-13 18:24:47 -05:00
James Valleroy
a9efa2f3a3
ejabberd: bosh port moved to 5443
In ejabberd 18.09-1, the default BOSH port is changed from 5280 to
5443. Update ejabberd diagnostics and the jwchat-plinth apache conf,
which is used by JSXC.

Fixes #1398.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-11-24 17:47:28 +05:30
Joseph Nuthalapati
8f88f0f6b4
mediawiki: Fix images throwing 403s
- Increment version number
- Functional test for uploading files

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-08-11 20:26:10 -04:00
Joseph Nuthalapati
a309b28035
configuration: Use augeas to edit Apache files
Move the file editing code to actions/config since it must be executed by a
super user.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-29 20:50:14 -04:00
Joseph Nuthalapati
9a3af288fa
configuration: Option to set a default app for FreedomBox
Closes #1315

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-29 20:50:10 -04:00
Jayasuganthi
6fe172acc8
mediawiki: Enable short URLs
Fixes #1274

Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-07-23 17:34:36 +05:30
Sunil Mohan Adapa
c6bccaaac0
Workaround security issues in django-axes
Newer versions of Django axes have newly way to get the IP address of a client
using ipware library. This has multiple security issues
https://github.com/jazzband/django-axes/issues/286 . Workaround them by
controlling the X-FORWARDED-FOR header sent from Apache to FreedomBox and by
limiting the headers that ipware uses.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-22 19:09:38 -04:00
Joseph Nuthalapati
c03f92a407
searx: Rewrite url from /searx to /searx/
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-20 21:45:11 -04:00
Sunil Mohan Adapa
ebabb2f8aa
sharing: Finish implementation
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-03-12 18:27:06 +05:30
Prachi
a42aed78f1
sharing: Add app to share disk folders using various protocols
- Adds the basic application framework
- Adds the sharing page for index and adding share
- Adds the action for sharing for adding and listing shares

Signed-off-by: Prachi Srivastava <prachisr@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-03-12 18:26:43 +05:30
Sunil Mohan Adapa
432aa1b343
searx: Strictly match relaxed URLs
To avoid unexpected security consequences.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:56:13 +05:30
Joseph Nuthalapati
26a53e6649
searx: Allow Searx to be added as a search engine to Firefox
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:55:30 +05:30