Commit Graph

153 Commits (feat/allow-decrypt-all-with-encryption-disabled)

Author SHA1 Message Date
John Molakvoæ 30ad57b135
Merge branch 'master' into jtr-refactor-main-htaccess
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2025-11-26 09:15:31 +07:00
Josh 61d5567913 chore: remove `mbstring.func_overload` from `.htaccess`
Deprecated in PHP 7.2
Removed in PHP 8.0
https://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.func-overload

Signed-off-by: Josh <josh.t.richards@gmail.com>
2025-08-25 13:19:36 +07:00
Josh 182836b68d
fix: drop unnecessary toggles in .htaccess
Signed-off-by: Josh <josh.t.richards@gmail.com>
2025-08-20 15:18:15 +07:00
Josh a0c3dd1eb4
chore: refactor .htaccess
Signed-off-by: Josh <josh.t.richards@gmail.com>
2025-08-20 14:07:03 +07:00
invario 2b58f74cc8
Fix: Remove X-XSS-Protection use, check and recommendation
Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
2025-06-13 16:12:27 +07:00
Benjamin Gaussorgues 22051a73c1
feat(login): add origin check at login
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-12-05 09:51:53 +07:00
Gonzalo Cao Cabeza de Vaca 0852dac1e9
FIX WebDav MacOS failed uploads php-fpm and big files (-36 error)
Current "SetEnvIf Transfer-Encoding "chunked" proxy-sendcl=1" setting fails with Macos Webdav Darwin client beacuse the header has a capital letter -> "Chunked" So you can fix it making condition case insensitive.
Extended description and tests results on https://github.com/nextcloud/server/issues/48878

Signed-off-by: Gonzalo Cao Cabeza de Vaca <57393+gonzalo@users.noreply.github.com>
2024-11-27 08:38:29 +07:00
Joas Schilling c7c031dbd2
fix(a11y): Add OTF font loading check
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-09-16 09:59:21 +07:00
Simon L. 3739fb7a80 fix: re-enable content-length header via htaccess
Signed-off-by: Simon L. <szaimen@e.mail.de>
2024-08-29 11:50:55 +07:00
Ferdinand Thiessen 52e243f4d8
fix(htaccess): Serve images as static assets
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-15 18:06:13 +07:00
Simon L. 9875668fc6 fix: chunked upload leading to 0-byte files
Signed-off-by: Simon L <szaimen@e.mail.de>
2024-04-25 16:29:38 +07:00
Louis Chemineau 3c0c373083
Buffer chunked requests
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-01-24 12:11:37 +07:00
Maxence Lange 9cd22dd949 remove leading slash
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-10-09 20:17:12 +07:00
Maxence Lange a250250985
Update .htaccess
Co-authored-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-10-03 14:19:44 +07:00
Maxence Lange 39c39a0f60 fix ocm-provider rewrite rules
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-10-02 14:38:10 +07:00
Ferdinand Thiessen e532419b15 fix(apache): Serve `mjs` (module javascript) as static files
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-06-07 15:19:44 +07:00
Git'Fellow 3009ae0d91
Remove PHP7 rules
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-04-05 19:45:45 +07:00
Julius Härtl 8b4d49cf50
Merge pull request #36057 from nextcloud/feat/esm-js-scripts 2023-03-22 09:17:28 +07:00
Ferdinand Thiessen d461da3b04 Adjust `.htaccess` to serve `.mjs` files with javascript mime type
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-03-16 15:57:51 +07:00
Nicolas Guichard 7aae6c12e5 Fix Cache-Control header of non-versioned assets
Non-cache-busted assets such as /dist/core-main.js also matched the
regex meant for cache-busted assets (note the ? at the end of the
regex).
The FilesMatch directive for cache-busted assets coming after the
non-cache-busted version all assets actually got the immutable flag
in their Cache-Control header. This caused client-side errors on
updates.

Query strings are not actually passed to FilesMatch directives so we
need another way to tell cache-busted/versionned assets apart from
non-versioned assets, here using If/Else directives.

Signed-off-by: Nicolas Guichard <nicolas@guichard.eu>
2023-03-11 18:17:53 +07:00
MichaIng 5f90b8eb11
Change X-Robots-Tag header from "none" to "noindex, nofollow"
While "none" is indeed equivalent to "noindex, nofollow" for Google, but seems to be not supported by Bing and probably other search engines.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name#other_metadata_names
https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag?hl=de#comma-separated-list
https://www.bing.com/webmasters/help/which-robots-metatags-does-bing-support-5198d240

Signed-off-by: MichaIng <micha@dietpi.com>
2023-02-15 20:16:51 +07:00
MichaIng ea0e45d81e Remove legacy Internet Explorer headers
X-UA-Compatible and X-Download-Options headers are interpreted or relevant for Internet Explorer only. With the deprecation of Internet Explorer support in Nextcloud 20 and planned support removal already in Nextcloud 22, these became obsolete and are hereby removed, including their removal from setup checks.

Signed-off-by: MichaIng <micha@dietpi.com>
2022-03-19 18:17:46 +07:00
Carl Schwan 7dddbd0c35 Improve caching policy
* Cache css with version in url. This makes most js and css requests to
  be cached by the browser

* Force caching previews, the etag is in the url so that if the propfind
  gives a new etag, we will refresh it otherwise it's no use to try to
  fetch the new etag and do tons of DB queries

Tested with firefox and 'debug' => false (important so that the js/css
urls are generated with ?v= parameter)

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-02-16 11:35:57 +07:00
Daniel Calviño Sánchez 24bc96ad09 Allow to serve static WebAssembly and TensorFlow Lite files
Since Talk 13 (and thus Nextcloud 23) WebAssembly (.wasm) and TensorFlow
Lite (.tflite) files need to be loaded from the web server to provide
certain features (like the background blur in the WebUI).

Those files can be treated in a similar way to other static resources,
and there should not be any problem caching or compressing them.
However, as compressed TensorFlow Lite files are only ~12% smaller,
the compression directive depends on the MIME type and there is no
standard MIME type for TensorFlow Lite files it is not worth to compress
them.

Moreover, no directives to compress WebAssembly files were added either,
as it seems that they would override any other compression directives
set in the default server configuration; for reference it could be done
with something like:
<IfModule mod_deflate.c>
  <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE application/wasm
  </IfModule>
</IfModule>

Depending on the setup "application/wasm" may not be associated with
".wasm" files, so the directive was added just in case, as otherwise
browsers log a warning.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-11-17 13:00:39 +07:00
acsfer 3ee82e4405
Fix module name for PHP8+ 2021-08-20 10:33:03 +07:00
acsfer 2303eebcc8
Update .htaccess (PHP8 and mod_lsapi)
- Add `mod_lsapi` (Cloudlinux) authorization headers
- Add `mod_php8` php_values
- Reformating for better lisibilty
2021-08-20 10:33:02 +07:00
acsfer ac9465e96d
Cache images on browser
Fix #26851
2021-07-06 23:56:05 +07:00
Julius Härtl 98198e042e
Make sure we properly ass well-known paths to index.php
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-29 11:30:53 +07:00
Christoph Wurst 6995223b1e
Add well known handlers API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 13:13:05 +07:00
zertrin af5380f5a8 Fix security header setting in .htaccess by adding 'onsuccess unset'
The headers might already be set by the system administrator at the http server
level (apache or nginx) for some or all virtualhosts.

Using "always set" in the .htaccess of Nextcloud leads to the situation where
the headers might be set twice (once in the default 'onsuccess' table and once
in the 'always' table)! Which leads to warnings in the admin area.

Adding "onsuccess unset" solves the problem, and forces the header in
the 'onsucess' table to be unset, and the header in the 'always' table to be set.

NOTE: with this change, Nextcloud overrides whatever the system administrator
might have already set

See github issues #16893 #16476 #16938 #18017 and discussion in PR #19002

Signed-off-by: zertrin <zertrin@gmail.com>
2020-03-05 11:11:09 +07:00
Maxence Lange bf408c58c2 +nodeinfo public service
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2019-08-29 16:21:16 +07:00
J0WI 1b074f48d8
Remove duplicated spaces
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2019-08-11 20:11:50 +07:00
J0WI bd9403d3da
Use "always" condition for security headers
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2019-08-11 20:11:50 +07:00
J0WI 3f2932c75a
Sort headers
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2019-08-11 20:11:50 +07:00
J0WI 76cbd7db6e
Add X-Frame-Options header to .htaccess
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2019-08-11 20:11:49 +07:00
Joas Schilling c6a69ba925
Remove the upload and memory setting
* Remove unneeded private method phpFileSize()
* Bump autoloader
* Remove setUploadLimit tests
* Remove integrity check hacks for upload limit

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-04 12:14:22 +07:00
Morris Jobke 92b5743bf4
Remove unused php5 config from .htaccess
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-04 11:24:10 +07:00
Julius Härtl b9f2ce2796
Fix loading of .woff2 files in .htaccess
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-11-18 11:02:20 +07:00
Morris Jobke df6e9109c8
Merge pull request #11396 from nextcloud/wellknown-webfinger
adding .well-known/webfinger
2018-10-24 14:51:15 +07:00
Patrik Kernstock 8cdd906d66 Add "Referrer-Policy" to htaccess file, addresses issue #11099
Signed-off-by: Patrik Kernstock <info@pkern.at>
2018-10-11 19:44:05 +07:00
Maxence Lange 6642efa7f4 adding .well-known/webfinger
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2018-10-10 13:01:23 +07:00
Morris Jobke de56915605
Merge pull request #7419 from Abijeet/feature-7175
Fixes #7175 - Allow to search for email address in user management
2018-03-06 21:53:37 +07:00
Dan Callahan 8797590099
Correct mistaken regex wildcard in .htaccess
Fixes #8578

Signed-off-by: Dan Callahan <dan.callahan@gmail.com>
2018-02-28 13:50:54 +07:00
Robert Scheck 7583615bab Handle SSL certificate verifications for others than Let's Encrypt
Do no longer (wrongly) rewrite URLs like

  * http://example.net/.well-known/pki-validation/file.txt (Comodo)
  * http://example.net/.well-known/pki-validation/fileauth.txt (DigiCert, Thawte, GeoTrust)
  * http://example.net/.well-known/pki-validation/gsdv.txt (GlobalSign)
  * http://example.net/.well-known/pki-validation/starfield.htm (Starfield, GoDaddy)
  * http://example.net/.well-known/pki-validation/swisssign-check.txt (SwissSign)

for automated SSL certificate verifications. All (common commercial)
certificate authorities (CA) except Let's Encrypt (via ACME) seem to
use "pki-validation" rather "acme-challenge" for their domain control
validation (DCV).

Signed-off-by: Robert Scheck <robert@fedoraproject.org>
2018-02-05 15:33:42 +07:00
Abijeet ac14d02e1e Added newline to end of htaccess file
Signed-off-by: Abijeet <abijeetpatro@gmail.com>
2017-12-18 21:40:02 +07:00
Abijeet ec28c54dbc Adds search by email function on the users screen.
Fixes #7175.

- Updated the query to fetch the users in users > everyone tab.
- Updated the query to fetch the users in users > admin tab.
- Tested to ensure that the disabled users are also being fetched.
- Added test cases.

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
2017-12-16 17:18:05 +07:00
Lukas Reschke bff6c8aafc
Move X-Frame-Options into PHP
The public calendar view should be embeddable and we can't do that if the .htaccess sets a global X-Frame-Options.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-03-26 17:26:11 +07:00
Flole998 075d39e61a Fix for Win Clients sometimes not connecting
Fix for Win Clients sometimes not connecting
2017-02-03 23:47:18 +07:00
Jörn Friedrich Dreyer 9802c5cdd8
Cache js, css and woff files for a week (#26591)
increases the cache duration for css and js files from 2 hours to half a year. Should they change the versionhash changes as well and a new file is fetched. Half a year should be long enough for oc updates.

Also allows caching woff files for 7 days. Currently, there is no versionhash available, but pressing F5 will also refresh the woff files.
2016-11-14 16:52:28 +07:00
Joas Schilling a3c8534b7b
Make sure memory limit is > post size and upload filesize 2016-09-13 16:50:36 +07:00