Commit Graph

855 Commits (feat/database/query-result-fetch-associative-fetch-num)

Author SHA1 Message Date
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
Robin Appelman fe78ef7a38 instrumentation for app booting
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-09 17:41:43 +07:00
Côme Chilliet 2a4ab201b7
Make sure application are only loaded once
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 16:06:32 +07:00
Côme Chilliet b7d9e43e25
Put back string in $includeMounts as it actually does something
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:32 +07:00
Côme Chilliet cd885b5705
Type sizes as int|float throughout the code base
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:31 +07:00
Côme Chilliet d00422b812
Fix computerFileSize when called with a string without unit
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:30 +07:00
Côme Chilliet 7a628c0361
Fix 32bits bigint support in Util/OC_Helper
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:30 +07:00
Côme Chilliet 255f230a87
Fix bigsize support on 32bits in OC_Helper
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:29 +07:00
Côme Chilliet e156f8339c
Revert "remove 32-bit workarounds"
This reverts commit dd8774389e.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:28 +07:00
Maxence Lange 4cac49c797 refresh cached app folder on install/upgrade
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-02-01 11:07:31 +07:00
Côme Chilliet f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Côme Chilliet 0c466b7ff5
Attempt at reducing psalm errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:22:09 +07:00
John Molakvoæ b9906fb21e
feat(files): Quota in navigation
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-01-17 18:30:41 +07:00
Côme Chilliet e4a780127d
Small fix in OC_API
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-02 15:05:18 +07:00
Simon L bfb3b2af9f increase preview_max_memory and make it easier to debug
Signed-off-by: Simon L <szaimen@e.mail.de>
2022-12-22 09:52:46 +07:00
Julius Härtl 1746344481 Use display name cache on getStorageInfo
Signed-off-by: Julius Härtl <jus@bitgrid.net>

Adapt test to also run isolated

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-16 17:15:21 +07:00
J0WI 110ea0df46 Allow empty mimeType
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-12-04 14:51:33 +07:00
J0WI 1dd3afefcd Add type hints
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-12-04 14:51:32 +07:00
J0WI 53994f600d Fix redundant condition
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-12-04 14:47:43 +07:00
J0WI 40166ddc0a Remove obsolete GD function overwrites
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-12-04 14:47:43 +07:00
Vincent Petry 0b09531dc6
Don't use quota cache through user management
When querying the free space through user management APIs, don't use the
cached quota value. The latter is only there to accelerate PROPFINDs.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-11-21 16:24:22 +07:00
John Molakvoæ d27a39271e
getAppValue expects string
Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2022-11-17 08:03:05 +07:00
Git'Fellow c7e2787300
Default Jpeg quality to 80
See https://sirv.com/help/articles/jpeg-quality-comparison/
Almost 50% of file size (compared to 90) and no visual differences.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2022-11-16 10:59:50 +07:00
Vincent Petry 966ee67efb
Merge pull request #34834 from nextcloud/bugfix/noid/skeleton-size-calc
Fix size calculation on copying the skeleton files
2022-11-04 17:23:40 +07:00
Côme Chilliet 2e83a21cd2
Merge pull request #34678 from pulsejet/patch-jpeg
Interlace all output JPEG
2022-11-03 16:11:03 +07:00
szaimen dd8774389e remove 32-bit workarounds
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-11-02 11:13:34 +07:00
Julius Härtl 5e416c529e
Use proper storage method for writing skeleton files
otherwise the filecache will have a wrong size for skeleton files

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-27 08:47:32 +07:00
Varun Patil 48917e718e Interlace all output JPEG
Progressive images are both smaller and faster to load.

Signed-off-by: Varun Patil <radialapps@gmail.com>
2022-10-25 09:40:20 +07:00
zorn-v a27388ccd3
Fix alternative logins custom css class
In NC 25 login page was changed, and alternative login css class get from `class` prop but not `style`. 
It is correct change in my opinion, so just add backend fix.

Signed-off-by: zorn-v <zorn7@yandex.ru>
2022-10-20 14:32:13 +07:00
Carl Schwan 92a5a8f075 Cleanup tags and Share component
- Port to LoggerInterface
- Use IDBConnection and IQueryBuilder instead of raw SQL and OC_DB
- Use IEventListener instead of hooks
- Remove the now unused OC_DB and OC_DB_StatementWrapper legacy utils

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-29 15:15:28 +07:00
Carl Schwan d61efdff6c
Fix quota type to int
Change the quota to int from float, since the quota is a number of bits
and a bits can not be splitted.

Fix #34010

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-12 09:26:04 +07:00
Côme Chilliet a2a7150d6d
Migrate Repair events to OCP\EventDispatcher\Event
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-25 16:15:48 +07:00
Côme Chilliet 4f260dce6e
Moving to string key for arguments of GenericEvent in Repair
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-25 16:13:46 +07:00
Carl Schwan 9b8ca9ad1f
Move findBinaryFinder and isFunctionEnabled away from OC_Helper
findBinaryFinder is now a service that is still private but with some
minor optimization (remove the hasKey check).

isFunctionEnabled is now in OCP\Util

Both function are still keep but all internal usage in nextcloud/server
were migrated to the new usage, so that we can remove it in 26

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-23 19:44:04 +07:00
Carl Schwan f8b13ecd60
Merge pull request #32363 from nextcloud/cleanup/remove-long-deprecated-classes
Remove OCP\App and OCP\BackgroundJob
2022-08-08 17:05:11 +07:00
Carl Schwan 458c2fa297
Remove OCP\App and OCP\BackgroundJob
Both deprecated since NC 23

IAppManager is the replacement for OCP\App unfortunately it can't be
dependency injected in classes used by the installed otherwise the
database connection is initialised too early

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-01 09:46:40 +07:00
Carl Schwan 7b723813ce
Multiple fixes
- Fix tests
- Use non deprecated event stuff
- Add a bit of type hinting to the new stuff
- More safe handling of instanceOfStorage (share might not be the first
  wrapper)
- Fix resharing

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-31 19:37:59 +07:00
Vincent Petry a95c19e14b
Add share attributes + prevent download permission
Makes it possible to store download permission

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:22 +07:00
Arthur Schiwon 0f2e75a6ce
fix loading legacy app.php with multi app dir
- requireAppFile() only appends /appinfo/app.php
- without the absolute path, require_once looks into include_path
- the first match in inlcude_path however migth be different from appPath
- fixed by providing the tested(!), full path to the app


Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-07-18 20:19:02 +07:00
MichaIng 21b3e87c77 Allow SSO authentication to provide a user secret
Implementing PR #24837 from immerda

Signed-off-by: MichaIng <micha@dietpi.com>
2022-07-12 19:19:00 +07:00
Julius Härtl ac79137816
Merge pull request #32592 from nextcloud/fix/noid/allow-rememberme-token-apache-auth-backend
allow use of rememberme cookies for IApacheAuth backends
2022-05-27 17:21:08 +07:00
Git'Fellow 8d876358dd
Move Gd failed operations to debug level
Instead of error
2022-05-25 18:26:42 +07:00
Arthur Schiwon a4a9e7601a
allow use of rememberme cookies for IApacheAuth backends
- e.g. enables it for SAML backend

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-05-25 13:09:06 +07:00
Carl Schwan 53169890d6 Fix psalm errors fron the end of the baseline file
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-16 10:58:26 +07:00
Carl Schwan eb45a6ca40
Merge pull request #32008 from nextcloud/fix/getSize-bool
Fix Call to a member function getSize() on bool
2022-05-12 21:00:27 +07:00
Carl Schwan 1c97611fa2 Fix Call to a member function getSize() on bool
getFileInfo might return false, handle this case by ignoring the result

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:11:46 +07:00
Robin Appelman 643ef06efc
don't unjail the path when getting the storage info
the original reason for adding it no longer exist.

This was added with #30985 since then the share source storage was also used, however this was changed with #32076

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-05-11 11:42:13 +07:00
John Molakvoæ c59c3b5c1f
Migrate to static icons colours
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-05-10 23:24:06 +07:00
Valdnet 71e31c3b86
l10n: Correct a typo
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2022-04-28 08:30:49 +07:00
Valdnet cb18220147
l10n: Fix code
Issue: #32171.

Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2022-04-27 09:04:00 +07:00
John Molakvoæ 036f871d01
Merge pull request #31492 from nextcloud/fix/check-secret-configured 2022-04-26 17:28:51 +07:00
Robin Appelman e50d78e11a
use and cache root storage info if a share can't be resolved
as is a broken share will never be cached

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 15:29:27 +07:00
John Molakvoæ 9a76f06eca
Merge pull request #31751 from nextcloud/theming-providers 2022-04-22 12:32:14 +07:00
Robin Appelman bdfef2dbd1
cache storage info in memcache for 5m
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-21 16:48:01 +07:00
Joas Schilling b3cf312edc
Start theming providers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-21 09:29:33 +07:00
Vincent Petry 018ca43c09
Merge pull request #31876 from nextcloud/bugfix/noid/fix-getCurrentApp-from-cli
Fix \OC_App::getCurrentApp() when being called from CLI or phpunit
2022-04-07 17:09:51 +07:00
blizzz fb7f65a687
Merge pull request #25747 from nextcloud/XAccelBuffering
Add X-Accel-Buffering header to downloads
2022-04-07 15:08:21 +07:00
Joas Schilling d96633916c
Log exception
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-07 14:45:58 +07:00
Joas Schilling a06ba88502
Fix \OC_App::getCurrentApp() when being called from CLI or phpunit
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-07 14:08:37 +07:00
Vincent Petry b8b4d247b4
Merge pull request #31194 from nextcloud/feat/allow-to-exclude-groups-from-password-enforcement
Allow to disable password policy enforcement for selected groups
2022-04-06 10:13:23 +07:00
Carl Schwan a29251e02d Allow to disable password policy enforcement for selected groups
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Co-authored-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-04-05 17:04:17 +07:00
Robin Appelman 5ae6cefd57
dont re-query fileinfo when getting dav quota
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-28 15:57:28 +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 0e58c113a5 Only check if secret is set if the nextcloud is installed
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-03-09 14:39:59 +07:00
Carl Schwan e6161af662 Also check for instanceid and passwordhash
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-03-09 13:36:06 +07:00
Carl Schwan 7496bf3461 Require the secret config to be configured
If it's not configured the instance will look like it is working but
various features will silently break (end to end encryption, setting
alternate email and probably more).

One issue is that changing the secret from empty to something will
break various other stuff (app token). I don't think there is a good way
to solve this issue other than breaking early instead of having to
handle a painful migration later on.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-03-08 23:11:08 +07:00
Robin Appelman 5c0fe93498
move teardown logic to SetupManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:50 +07:00
Robin Appelman 15ff65c12f
start moving filesystem setup logic to it's own place
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:47 +07:00
Robin Appelman 8b22a463e9
Merge pull request #31266 from nextcloud/root-setup-mountprovider
move root mount setup to mountproviders
2022-03-04 13:44:05 +07:00
Julius Härtl eede608c0e
Add event logging to app loading
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-02-28 11:24:41 +07:00
Robin Appelman 8b7c8447a0
move root mount setup to mountproviders
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-24 17:21:42 +07:00
Robin Appelman de260001f1
handle setupFS with null user
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-09 16:01:36 +07:00
Robin Appelman b799fd40e9
dont mark fs as setup when no user is active
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-09 16:01:31 +07:00
Robin Appelman 1ab58eff0f
pass user object during fs init
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-09 16:01:24 +07:00
Robin Appelman 0217949715
only setup part of the filesystem for appdata requests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-09 16:01:21 +07:00
Claus-Justus Heine a355410b88
Use the unjailed-path in OC_Helper::getStorageInfo() for files located in SharedStorage.
The current implementation already switches the storage-backend to
$storage->getSourceStorage(). However, it then calls
$rootInfo->getInternalPath() which returns the internal path relative to
the storage where the share is mounted. This is wrong, we need also to
unjail the path. Compare, e.g., with
OCA\Files_Sharing\SharedStorage::file_get/put_contents() for the
"logic".

Signed-off-by: Claus-Justus Heine <himself@claus-justus-heine.de>
2022-02-03 10:05:49 +07:00
John Molakvoæ 73e3d06781
Merge pull request #30855 from nextcloud/psalm/theming 2022-01-27 20:04:02 +07:00
Louis Chemineau 04c9de7312 Add deprecation notice to script & addScript func
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-27 11:04:30 +07:00
Carl Schwan e3a12b3482
Fix psalm issues in theming app
After this change, we are down to only one psalm warning for this app
and related to the Application.php. This also make composer
psam:update-baseline not silently ignore new errors.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-26 14:26:58 +07:00
Unpublished 854890a734 Add X-Accel-Buffering header to downloads
Signed-off-by: Unpublished <unpublished@gmx.net>
2022-01-17 08:17:12 +07:00
Carl Schwan 89d109a4d9
Merge pull request #30508 from nextcloud/fix/psaml-bin
Fix psalm not running
2022-01-13 09:51:04 +07:00
Carl Schwan 6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +07:00
Joas Schilling c47406ad3c
Merge pull request #30291 from nextcloud/image-memory-limit
Prevent loading images that would require too much memory.
2022-01-11 13:35:56 +07:00
Joachim Bauch d3d65e5c88
Prevent loading images that would require too much memory.
For most image formats, the header specifies the width/height.
PHP allocates an image object from that size, even if the actual
image data is much smaller. This image object size is not limited
by the limit configured in PHP.

The memory limit can be configured through "config.php" setting
"preview_max_memory" and defaults to 128 MBytes which should be
enough for most images without filling up all memory.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2022-01-11 11:44:38 +07:00
Louis Chemineau d3661c7d38
Deprecate script function
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-08 10:15:48 +07:00
John Molakvoæ (skjnldsv) 806a176a57
Move backgroundjob script after main core scripts
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2022-01-08 10:14:53 +07:00
John Molakvoæ (skjnldsv) 87d0904b6f
Split common vendor chunk
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2022-01-08 10:14:50 +07:00
John Molakvoæ (skjnldsv) b664aad7ab
Move bundles to /dist
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2022-01-08 10:11:58 +07:00
Valdnet 5cb51916de
l10n: Add a text string to translation
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-12-20 08:52:12 +07:00
Valdnet bd1264ef7f
l10n: Add <code>
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-12-15 17:50:18 +07:00
Valdnet 4f99385311
l10n: Add <code>
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-12-15 17:47:41 +07:00
Valdnet ebc3169105
l10n: Separate words and add dots
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-12-15 17:37:00 +07:00
Côme Chilliet 8504f0a59e
Avoid assignment in if clause
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-06 14:26:27 +07:00
Côme Chilliet ab3a1d5706
Fix typing problems in OC_Image
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-06 14:26:26 +07:00
Côme Chilliet d537226368
Avoid calling image* methods on boolean
This avoids fatal errors on PHP>=8, and warnings on older versions.
Log should also be clearer.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-06 14:26:09 +07:00
John Molakvoæ e296417ca2
Merge pull request #29527 from nextcloud/rakekniven-patch-1 2021-12-04 12:08:16 +07:00
John Molakvoæ (skjnldsv) 71a3528510
Allow scripts prioritization based on other apps
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-12-02 20:00:46 +07:00
John Molakvoæ (skjnldsv) aaad09220d
Remove files_iedavclient
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2021-11-30 14:47:45 +07:00
John Molakvoæ c624c7eb5d
Merge pull request #29966 from nextcloud/feat/remove-isIE 2021-11-30 14:04:05 +07:00
John Molakvoæ (skjnldsv) a325141545
Remove isIE and associated legacy scripts
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-11-30 13:03:08 +07:00