Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nextcloud/server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v30.0.4
Choose a base ref
...
head repository: nextcloud/server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jun 24, 2023

  1. Clean-up some remaining readdir calls with undesirable false evaluati…

    …on potential
    
    Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
    joshtrichards authored and szaimen committed Jun 24, 2023
    Copy the full SHA
    e7cbaf3 View commit details

Commits on Jan 6, 2024

  1. Update config.sample.php

    Comments to clarify the purpose of session_keepalive.
    Fixes issue in Nextcloud Documentation (nextcloud/documentation#7244)
    
    Signed-off-by: HelloDarkness <111370255+hellodarkness@users.noreply.github.com>
    hellodarkness authored Jan 6, 2024
    Copy the full SHA
    5d91487 View commit details

Commits on Jul 1, 2024

  1. fix(TaskProcessingApiController): Don't use + to merge non-assoc. arrays

    Signed-off-by: Marcel Klehr <mklehr@gmx.net>
    marcelklehr committed Jul 1, 2024
    Copy the full SHA
    224779c View commit details

Commits on Jul 8, 2024

  1. fix(config): Add missing handling for envCache in getKeys()

    NC_ env variable overrides were not appearing in
    the output of `occ config:list system` nor `occ
    config:system:get xxx`. This was creating nearly
    impossible to diagnose configuration/ behavior
    disprepancies.
    
    - Refactored readData() so that we aren't saving
      the entire environment in the envCache anymore
      (only those prefixed "NC_") and so that we save
      NC_ provided config values under their real
      key.
    - Refactored getValue() to accommodate readData()
      refactor
    - Fixed getKeys() to properly return
      envCache keys too
    
    Environment provided config variables now appear
    in `occ config:list system` as expected.
    
    Environment provided config variables now appear
    when queried via `occ config:system:get KEY`
    
    envCache is now free of non-NC stuff.
    
    Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
    joshtrichards committed Jul 8, 2024
    Copy the full SHA
    62192ca View commit details
  2. fix(config): add envCache tests for getKeys()

    Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
    joshtrichards committed Jul 8, 2024
    Copy the full SHA
    2ffff51 View commit details
  3. fix: switch from explode to substr (faster)

    Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
    joshtrichards committed Jul 8, 2024
    Copy the full SHA
    34a9e48 View commit details

Commits on Aug 1, 2024

  1. feat(cache): CLI should not fail if APCu is not available

    but fallback to NullCache. This can be the case if APCu is used without apc.enable_cli=1. APCu however runs within the PHP instance and hence cannot be shared between CLI and web or used as distributed cache. The CLI call can hence only create or invalidate entries for itself. For short-living CLI calls, this is theoretically a downsides regarding performance and resource usage, and Nextcloud must not have any issues using the dummy NullCache instead of an isolated freshly created and destroyed APCu instance.
    
    This partly reverts #25770. The fallback was removed, because CLI calls started to hang after #25440. The reason however was not that a cache is generally required for CLI calls, but because the previously logged warning invoked the user backend, which invoked again the caching backend, causing a loop.
    
    This commit re-adds the fallback without logging a warning, and for APCu only. For mentioned reasons, it is okay to fallback to NullCache silently. If Redis or memcached are configured but not available, then the web UI would fail as well, and it makes sense to abort and inform CLI calls as well then.
    
    The motivation is to make apc.enable_cli=1 optional, and that hence the documentation about it can be removed. We should not enforce admins to enable APCu for CLI calls, which is reasonably disabled by default. This also reduces requirements for hosting providers to support Nextcloud.
    
    Signed-off-by: MichaIng <micha@dietpi.com>
    MichaIng authored and AndyScherzinger committed Aug 1, 2024
    Copy the full SHA
    89cd3b4 View commit details

Commits on Aug 9, 2024

  1. fix(jobs): Swicth to executeStatement() while deleting rows

    Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
    solracsf authored Aug 9, 2024
    Copy the full SHA
    c6be80a View commit details
  2. fix: lint

    Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
    solracsf authored Aug 9, 2024
    Copy the full SHA
    2156a92 View commit details

Commits on Aug 14, 2024

  1. fix(CI)!: Add stable30 to and remove stable27 from GitHub Actions

    Signed-off-by: Joas Schilling <coding@schilljs.com>
    nickvergessen committed Aug 14, 2024
    Copy the full SHA
    31b74bc View commit details
  2. fix(security): Update expiration date in security.txt

    Signed-off-by: Joas Schilling <coding@schilljs.com>
    nickvergessen committed Aug 14, 2024
    Copy the full SHA
    04944aa View commit details
  3. feat(release)!: Bump Server version to 31

    Signed-off-by: Joas Schilling <coding@schilljs.com>
    nickvergessen committed Aug 14, 2024
    Copy the full SHA
    7b53a85 View commit details
  4. feat(branchoff): Bump versions and requirements in apps

    Signed-off-by: Joas Schilling <coding@schilljs.com>
    nickvergessen committed Aug 14, 2024
    Copy the full SHA
    eb36543 View commit details
  5. chore(assets): Recompile assets

    Signed-off-by: Joas Schilling <coding@schilljs.com>
    nickvergessen committed Aug 14, 2024
    Copy the full SHA
    71bfa5b View commit details
  6. fix(3rdparty): Update 3rdparty after dependabot changes

    Signed-off-by: Joas Schilling <coding@schilljs.com>
    nickvergessen committed Aug 14, 2024
    Copy the full SHA
    9d446d5 View commit details
  7. Copy the full SHA
    effbc44 View commit details
  8. chore(deps): bump is-svg from 5.0.1 to 5.1.0

    Bumps [is-svg](https://github.com/sindresorhus/is-svg) from 5.0.1 to 5.1.0.
    - [Release notes](https://github.com/sindresorhus/is-svg/releases)
    - [Commits](sindresorhus/is-svg@v5.0.1...v5.1.0)
    
    ---
    updated-dependencies:
    - dependency-name: is-svg
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 14, 2024
    Copy the full SHA
    a7eb156 View commit details
  9. chore(deps): bump actions/upload-artifact in the github-actions group

    Bumps the github-actions group with 1 update: [actions/upload-artifact](https://github.com/actions/upload-artifact).
    
    
    Updates `actions/upload-artifact` from 4.3.4 to 4.3.6
    - [Release notes](https://github.com/actions/upload-artifact/releases)
    - [Commits](actions/upload-artifact@0b2256b...834a144)
    
    ---
    updated-dependencies:
    - dependency-name: actions/upload-artifact
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: github-actions
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 14, 2024
    Copy the full SHA
    ded69c0 View commit details
  10. fix(AppMenu): Prevent menu entries from jumping on hover

    Only grow and shrink app menu entry if needed
    
    Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
    susnux committed Aug 14, 2024
    Copy the full SHA
    21c30e5 View commit details
  11. chore: Compile assets

    Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
    susnux committed Aug 14, 2024
    Copy the full SHA
    44705ab View commit details
  12. Copy the full SHA
    0f10cab View commit details
  13. Merge pull request #47203 from nextcloud/fix/app-menu-hover

    fix(AppMenu): Prevent menu entries from jumping on hover
    susnux authored Aug 14, 2024
    Copy the full SHA
    fb90e7e View commit details
  14. fix(webauthn): Increase database column for public key id

    * Resolves #34476
    
    There is no maximum length defined in the standard,
    most common the length is between 128 and 200 characters,
    but as we store it not in plain data but base64 encoded the length can grow about 1/3.
    
    We had a regression with 'Nitrokey 3' which created IDs with 196 byte length -> 262 bytes encoded base64.
    So to be save we increase the size to 512 bytes.
    
    Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
    susnux committed Aug 14, 2024
    Copy the full SHA
    b582630 View commit details
  15. Merge pull request #47240 from nextcloud/fix/webauth-credentials-length

    fix(webauthn): Increase database column for public key id
    susnux authored Aug 14, 2024
    Copy the full SHA
    2c24c3c View commit details

Commits on Aug 15, 2024

  1. fix: Adjust legacy CSS styles for new Nextcloud 30 design

    Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
    susnux committed Aug 15, 2024
    Copy the full SHA
    d0a0be9 View commit details
  2. chore: Compile assets

    Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
    susnux committed Aug 15, 2024
    Copy the full SHA
    d025c55 View commit details
  3. Fix(l10n): Update translations from Transifex

    Signed-off-by: Nextcloud bot <bot@nextcloud.com>
    nextcloud-bot committed Aug 15, 2024
    Copy the full SHA
    e218d1f View commit details
  4. fix(adminaudit): Don't crash when creating folder

    Signed-off-by: Joas Schilling <coding@schilljs.com>
    nickvergessen committed Aug 15, 2024
    Copy the full SHA
    774427a View commit details
  5. feat(webauthn): Add user verification to webauthn challenges

    Require user verification if all tokens are registered
    with UV flag, else discourage it
    
    Signed-off-by: S1m <git@sgougeon.fr>
    Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
    p1gp1g authored and nickvergessen committed Aug 15, 2024
    Copy the full SHA
    9189bc2 View commit details
  6. Merge pull request #47253 from nextcloud/feat/webauthn-uv

    feat(webauthn): Add user verification to webauthn challenges
    nickvergessen authored Aug 15, 2024
    Copy the full SHA
    601b3b1 View commit details
  7. fix(userstatus): Don't set predefined user status as custom when chan…

    …ging "Clear at"
    
    Signed-off-by: Joas Schilling <coding@schilljs.com>
    nickvergessen committed Aug 15, 2024
    Copy the full SHA
    50c48aa View commit details
  8. chore(assets): Recompile assets

    Signed-off-by: Joas Schilling <coding@schilljs.com>
    nickvergessen committed Aug 15, 2024
    Copy the full SHA
    28e6328 View commit details
  9. Merge pull request #47252 from nextcloud/bugfix/noid/dont-crash-when-…

    …creating-folder
    
    fix(adminaudit): Don't crash when creating folder
    nickvergessen authored Aug 15, 2024
    Copy the full SHA
    15550de View commit details
  10. perf: improve cleanup of tags/comments

    delete entire chunk at once instead of one-by-one
    
    Signed-off-by: Robin Appelman <robin@icewind.nl>
    icewind1991 committed Aug 15, 2024
    Copy the full SHA
    0f9ea19 View commit details
  11. Merge pull request #47258 from nextcloud/bugfix/noid/translated-prede…

    …fined-user-status
    
    Don't save translated predefined user status as custom status
    nickvergessen authored Aug 15, 2024
    Copy the full SHA
    3dfe306 View commit details

Commits on Aug 16, 2024

  1. Fix(l10n): Update translations from Transifex

    Signed-off-by: Nextcloud bot <bot@nextcloud.com>
    nextcloud-bot committed Aug 16, 2024
    Copy the full SHA
    f4f7c75 View commit details
  2. fix(occ): Add support for UNIX sockets to db:convert-type

    Fixes #31998
    
    Adds support to `occ db:convert-type` to support UNIX socket connections via MySQL/MariaDB. Uses same `dbhost` / `hostname` parameter parsing logic (adapted) as used elsewhere (at least the relevant parts) for consistency.
    
    Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
    joshtrichards authored and skjnldsv committed Aug 16, 2024
    Copy the full SHA
    71fff03 View commit details
  3. Refactors encryption app commands.

    To improve code readability.
    
    Signed-off-by: Faraz Samapoor <fsa@adlas.at>
    Faraz Samapoor authored and skjnldsv committed Aug 16, 2024
    Copy the full SHA
    fc8b886 View commit details
  4. Uses early returns.

    To improve code readability.
    
    Signed-off-by: Faraz Samapoor <fsa@adlas.at>
    Faraz Samapoor authored and skjnldsv committed Aug 16, 2024
    Copy the full SHA
    6b795da View commit details
  5. feat: Add user:welcome command

    Signed-off-by: FedericoHeichou <federicoheichou@gmail.com>
    FedericoHeichou authored and sorbaugh committed Aug 16, 2024
    Copy the full SHA
    a41e2f0 View commit details
  6. Copy the full SHA
    75180a6 View commit details
  7. invalidate oauth2 tokens only for seen users

    Signed-off-by: Artur Neumann <artur@jankaritech.com>
    individual-it authored and skjnldsv committed Aug 16, 2024
    Copy the full SHA
    cc44ec5 View commit details
  8. fix: expect invalidateTokensOfUser only be called for seen users

    Signed-off-by: Artur Neumann <artur@jankaritech.com>
    individual-it authored and skjnldsv committed Aug 16, 2024
    Copy the full SHA
    84ee79f View commit details
  9. Merge branch 'master' into jr-readdir-false-false

    Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
    skjnldsv authored Aug 16, 2024
    Copy the full SHA
    d35c4eb View commit details
  10. fix: postgresql GRANT user's permission after createDatabase, ensure …

    …database exist when GRANT
    whlsxl authored and skjnldsv committed Aug 16, 2024
    Copy the full SHA
    f490a4e View commit details
  11. fix: use $this->tryCreateDbUser condition

    whlsxl authored and skjnldsv committed Aug 16, 2024
    Copy the full SHA
    67c52d2 View commit details
  12. (base) Give a hint in web interface if SimpleXML (php-xml) is missing

    Fixes #2180
    And prevents #31473, #23970, #18610, #15708
    
    Avoids a 500 error and also gives a useful error message on the web interface if this module isn't installed, gets overlooked during a PHP upgrade, etc.
    
    While we check for it later, it's too late for session.
    
    Inspired by #17163
    
    Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
    joshtrichards authored and skjnldsv committed Aug 16, 2024
    Copy the full SHA
    8032b6a View commit details
  13. Copy the full SHA
    b8dbed3 View commit details
  14. Copy the full SHA
    b8b8125 View commit details
  15. Copy the full SHA
    d94073d View commit details
Showing 6,305 changed files with 160,385 additions and 164,349 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 17 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .git-blame-ignore-revs

# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

# Format control structures
caff1023ea72bb2ea94130e18a2a6e2ccf819e5f
# Update to coding-standard 1.1.1
aa5f037af71c915424c6dcfd5ad2dc82797dc0d6
# Update to coding-standard 1.2.3
af6de04e9e141466dc229e444ff3f146f4a34765
0bd284cb81b6866338aaaa67aa1d81ef9bfbb2ab
8af7ecb2576071f170ecbb0aa2311b26581e40e2
# Update to coding-standard 1.3.1
9836e9b16484582d309c8437ab46d82e34956941
# Automated refactorings
49dd79eabb2b8902559a7a4e8f8fcad54f46b604
31 changes: 20 additions & 11 deletions .github/CODEOWNERS
This CODEOWNERS file is valid.
Original file line number Diff line number Diff line change
@@ -2,14 +2,18 @@
/apps/admin_audit/appinfo/info.xml @luka-nextcloud @blizzz
/apps/cloud_federation_api/appinfo/info.xml @mejo-
/apps/comments/appinfo/info.xml @edward-ly @Pytal
/apps/contactsinteraction/appinfo/info.xml @kesselb @miaulalala @ChristophWurst @GretaD @hamza221 @st3iny
/apps/dashboard/appinfo/info.xml @julien-nc @juliushaertl
/apps/dav/lib/CalDAV @ChristophWurst @miaulalala @tcitworld
/apps/dav/lib/CardDAV @ChristophWurst @miaulalala @tcitworld
/apps/contactsinteraction/appinfo/info.xml @kesselb @SebastianKrupinski
/apps/contactsinteraction/lib @kesselb @SebastianKrupinski
/apps/contactsinteraction/tests @kesselb @SebastianKrupinski
/apps/dashboard/appinfo/info.xml @julien-nc @juliusknorr
/apps/dav/lib/CalDAV @st3iny @SebastianKrupinski @tcitworld
/apps/dav/lib/CardDAV @hamza221 @SebastianKrupinski
/apps/dav/tests/unit/CalDAV @st3iny @SebastianKrupinski @tcitworld
/apps/dav/tests/unit/CardDAV @hamza221 @SebastianKrupinski
/apps/encryption/appinfo/info.xml @come-nc @icewind1991
/apps/federatedfilesharing/appinfo/info.xml @icewind1991 @danxuliu
/apps/federation/appinfo/info.xml @datenangebot
/apps/files/appinfo/info.xml @skjnldsv @Pytal @ArtificialOwl @come-nc @artonge @icewind1991 @szaimen @susnux @Fenn-CS
/apps/federation/appinfo/info.xml @nfebe
/apps/files/appinfo/info.xml @skjnldsv @Pytal @ArtificialOwl @come-nc @artonge @icewind1991 @szaimen @susnux @nfebe
/apps/files_external/appinfo/info.xml @icewind1991 @artonge
/apps/files_reminders/appinfo/info.xml @Pytal
/apps/files_sharing/appinfo/info.xml @skjnldsv @come-nc
@@ -20,13 +24,14 @@
/apps/settings/appinfo/info.xml @Pytal @JuliaKirschenheuter
/apps/sharebymail/appinfo/info.xml @Altahrim
/apps/systemtags/appinfo/info.xml @Antreesy @marcelklehr
/apps/theming/appinfo/info.xml @skjnldsv @juliushaertl
/apps/theming/appinfo/info.xml @skjnldsv @juliusknorr
/apps/twofactor_backupcodes/appinfo/info.xml @st3iny @miaulalala @ChristophWurst
/apps/updatenotification/appinfo/info.xml @Pytal @JuliaKirschenheuter
/apps/user_ldap/appinfo/info.xml @come-nc @blizzz
/apps/user_status/appinfo/info.xml @Antreesy @nickvergessen
/apps/weather_status/appinfo/info.xml @julien-nc @juliushaertl
/apps/workflowengine/appinfo/info.xml @blizzz @juliushaertl
/apps/weather_status/appinfo/info.xml @julien-nc @juliusknorr
/apps/webhook_listeners/appinfo/info.xml @come-nc @julien-nc
/apps/workflowengine/appinfo/info.xml @blizzz @juliusknorr

# Frontend expertise
/apps/files/src* @skjnldsv
@@ -36,9 +41,9 @@
/apps/files_trashbin/src* @skjnldsv

# Security team
/build/psalm-baseline-security.xml @nickvergessen
/resources/codesigning @mgallien @miaulalala @nickvergessen
/resources/config/ca-bundle.crt @ChristophWurst @miaulalala @nickvergessen
/.drone.yml @nickvergessen
/resources/config/ca-bundle.crt @miaulalala @nickvergessen

# Two-Factor Authentication
# https://github.com/nextcloud/wg-two-factor-authentication#members
@@ -64,6 +69,10 @@ ResponseDefinitions.php @provokateurin
/lib/public/Talk @nickvergessen
/lib/public/UserStatus @nickvergessen

# Groupware
/build/integration/dav_features/caldav.feature @st3iny @SebastianKrupinski
/build/integration/dav_features/carddav.feature @st3iny @SebastianKrupinski

# Personal interest
*/Activity/* @nickvergessen
*/Notifications/* @nickvergessen
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ In some areas unit testing is hard (aka almost impossible) as of today - in thes

### Sign your work

We use the Developer Certificate of Origin (DCO) as a additional safeguard
We use the Developer Certificate of Origin (DCO) as an additional safeguard
for the Nextcloud project. This is a well established and widely used
mechanism to assure contributors have confirmed their right to license
their contribution under the project's license.
31 changes: 8 additions & 23 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
@@ -62,22 +62,6 @@ body:
description: Describe what you expected to happen instead.
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Installation method
description: |
Select installation method you've used.
_Describe the method in the "Additional info" section if you chose "Other"._
options:
- "Community Web installer on a VPS or web space"
- "Community Manual installation with Archive"
- "Community Docker image"
- "Community NextcloudPi appliance"
- "Community SNAP package"
- "Community VM appliance"
- "Other Community project"
- "Official All-in-One appliance"
- type: dropdown
id: nextcloud-version
attributes:
@@ -88,6 +72,7 @@ body:
options:
- "28"
- "29"
- "30"
- "master"
validations:
required: true
@@ -110,10 +95,10 @@ body:
Select PHP engine version serving Nextcloud Server.
_Describe in the "Additional info" section if you chose "Other"._
options:
- "PHP 8.0"
- "PHP 8.1"
- "PHP 8.2"
- "PHP 8.3"
- "PHP 8.2"
- "PHP 8.1"
- "PHP 8.0"
- "Other"
- type: dropdown
id: webserver
@@ -183,7 +168,7 @@ body:
./occ config:list system
```
> NOTE: This will be automatically formatted into code for better readability.
render: shell
render: json
- type: textarea
id: apps
attributes:
@@ -215,10 +200,10 @@ body:
attributes:
label: Nextcloud Logs
description: |
Provide Nextcloud logs lines.
Copy all contents from `data/nextcloud.log` or a RAW from `/settings/admin/logging` section:
Provide relevant Nextcloud log entries (e.g. from the time period you reproduced the problem).
Copy full individual entries from `data/nextcloud.log` or use `Copy raw entry` from `/settings/admin/logging` section:
> NOTE: This will be automatically formatted into code for better readability.
render: shell
render: json
- type: textarea
id: additional-info
attributes:
51 changes: 51 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -59,6 +59,20 @@ updates:
reviewers:
- "nextcloud/server-dependabot"

# phpunit
- package-ecosystem: composer
directory: "/vendor-bin/phpunit"
schedule:
interval: weekly
day: saturday
time: "04:40"
timezone: Europe/Madrid
labels:
- "3. to review"
- "feature: dependencies"
reviewers:
- "nextcloud/server-dependabot"

# Main master npm
- package-ecosystem: npm
directory: "/"
@@ -138,6 +152,25 @@ updates:
# Disable automatic rebasing because without a build CI will likely fail anyway
rebase-strategy: "disabled"

- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
target-branch: stable30
labels:
- "3. to review"
- "feature: dependencies"
reviewers:
- "nextcloud/server-dependabot"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major", "version-update:semver-minor"]
# Disable automatic rebasing because without a build CI will likely fail anyway
rebase-strategy: "disabled"

- package-ecosystem: composer
directory: "/build/integration"
schedule:
@@ -174,6 +207,24 @@ updates:
- dependency-name: "*"
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]

- package-ecosystem: composer
directory: "/build/integration"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
target-branch: stable30
labels:
- "3. to review"
- "feature: dependencies"
reviewers:
- "nextcloud/server-dependabot"
ignore:
# ignore all GitHub linguist patch updates
- dependency-name: "*"
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]

# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
6 changes: 3 additions & 3 deletions .github/workflows/autocheckers.yml
Original file line number Diff line number Diff line change
@@ -45,21 +45,21 @@ jobs:

strategy:
matrix:
php-versions: ['8.3']
php-versions: ['8.1']

name: PHP checkers

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype, json, mbstring
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage: none
ini-file: development
env:
2 changes: 1 addition & 1 deletion .github/workflows/block-outdated-3rdparty.yml
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ jobs:
- 'version.php'
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: 3rdparty commit hash on current branch
id: actual
2 changes: 1 addition & 1 deletion .github/workflows/block-unconventional-commits.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0
with:
6 changes: 3 additions & 3 deletions .github/workflows/command-compile.yml
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ jobs:
fi
- name: Init branch
uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1
uses: xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v1
id: comment-branch

- name: Add reaction on failure
@@ -100,7 +100,7 @@ jobs:
key: git-repo

- name: Checkout ${{ needs.init.outputs.head_ref }}
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
fetch-depth: 0
@@ -119,7 +119,7 @@ jobs:
fallbackNpm: '^10'

- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v3
with:
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
cache: npm
4 changes: 2 additions & 2 deletions .github/workflows/command-pull-3rdparty.yml
Original file line number Diff line number Diff line change
@@ -34,11 +34,11 @@ jobs:
exit 1
- name: Init branch
uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1
uses: xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v1
id: comment-branch

- name: Checkout ${{ steps.comment-branch.outputs.head_ref }}
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
token: ${{ secrets.COMMAND_BOT_PAT }}
27 changes: 17 additions & 10 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -29,6 +29,8 @@ jobs:
npmVersion: ${{ steps.versions.outputs.npmVersion }}

env:
# We'll install cypress in the cypress job
CYPRESS_INSTALL_BINARY: 0
PUPPETEER_SKIP_DOWNLOAD: true

steps:
@@ -39,7 +41,7 @@ jobs:
exit 1
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# We need to checkout submodules for 3rdparty
submodules: true
@@ -62,7 +64,7 @@ jobs:
fallbackNpm: "^10"

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

@@ -78,7 +80,7 @@ jobs:
run: npm run cypress:version

- name: Save context
uses: buildjet/cache/save@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
uses: buildjet/cache/save@v4
with:
key: cypress-context-${{ github.run_id }}
path: ./
@@ -101,23 +103,28 @@ jobs:

steps:
- name: Restore context
uses: buildjet/cache/restore@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
uses: buildjet/cache/restore@v4
with:
fail-on-cache-miss: true
key: cypress-context-${{ github.run_id }}
path: ./

- name: Set up node ${{ needs.init.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ needs.init.outputs.nodeVersion }}

- name: Set up npm ${{ needs.init.outputs.npmVersion }}
run: npm i -g 'npm@${{ needs.init.outputs.npmVersion }}'

- name: Install cypress
run: ./node_modules/cypress/bin/cypress install

- name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests
uses: cypress-io/github-action@df7484c5ba85def7eef30db301afa688187bc378 # v6.7.2
uses: cypress-io/github-action@f1f0912d392f0d06bdd01fb9ebe3b3299e5806fb # v6.7.7
with:
# We already installed the dependencies in the init job
install: false
component: ${{ matrix.containers == 'component' }}
group: ${{ matrix.use-cypress-cloud && matrix.containers == 'component' && 'Run component' || matrix.use-cypress-cloud && 'Run E2E' || '' }}
# cypress env
@@ -136,7 +143,7 @@ jobs:
SPLIT_INDEX: ${{ matrix.containers == 'component' && 0 || matrix.containers }}

- name: Upload snapshots
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: always()
with:
name: snapshots_${{ matrix.containers }}
@@ -147,18 +154,18 @@ jobs:
run: docker logs nextcloud-cypress-tests-${{ env.APP_NAME }} > nextcloud.log

- name: Upload NC logs
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: failure() && matrix.containers != 'component'
with:
name: nc_logs_${{ matrix.containers }}
path: nextcloud.log

- name: Create data dir archive
if: failure() && matrix.containers != 'component'
run: docker exec nextcloud-cypress-tests-server tar -cvjf - data > data.tar
run: docker exec nextcloud-cypress-tests_server tar -cvjf - data > data.tar

- name: Upload data dir archive
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: failure() && matrix.containers != 'component'
with:
name: nc_data_${{ matrix.containers }}
8 changes: 4 additions & 4 deletions .github/workflows/files-external-ftp.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['8.1', '8.3']
php-versions: ['8.1', '8.4']
ftpd: ['proftpd', 'vsftpd', 'pure-ftpd']
include:
- php-versions: '8.1'
@@ -53,7 +53,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -72,7 +72,7 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions: ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -100,7 +100,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.xml
flags: phpunit-files-external-ftp
10 changes: 5 additions & 5 deletions .github/workflows/files-external-s3.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.1', '8.2', '8.3', '8.4']
include:
- php-versions: '8.2'
coverage: ${{ github.event_name != 'pull_request' }}
@@ -60,7 +60,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -98,7 +98,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.xml
flags: phpunit-files-external-s3
@@ -135,7 +135,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -165,7 +165,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.xml
flags: phpunit-files-external-s3
8 changes: 4 additions & 4 deletions .github/workflows/files-external-sftp.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['8.1', '8.3']
php-versions: ['8.1', '8.4']
sftpd: ['openssh']
include:
- php-versions: '8.1'
@@ -53,7 +53,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -68,7 +68,7 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions: ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -89,7 +89,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.xml
flags: phpunit-files-external-sftp
10 changes: 8 additions & 2 deletions .github/workflows/files-external-smb-kerberos.yml
Original file line number Diff line number Diff line change
@@ -43,16 +43,22 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

- name: Checkout user_saml
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: nextcloud/user_saml
path: apps/user_saml

- name: Install user_saml
run: |
cd apps/user_saml
composer i
cd ../..
- name: Pull images
run: |
docker pull ghcr.io/icewind1991/samba-krb-test-dc
8 changes: 4 additions & 4 deletions .github/workflows/files-external-smb.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.1', '8.3']
php-versions: ['8.1']
include:
- php-versions: '8.1'
coverage: ${{ github.event_name != 'pull_request' }}
@@ -56,7 +56,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -65,7 +65,7 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions: ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, smbclient, sqlite, pdo_sqlite
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, smbclient, sqlite, pdo_sqlite
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
ini-file: development
env:
@@ -94,7 +94,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@922d8d7b314a529f2be903c1e79ee8283c492863 # v4.1.1
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v4.1.1
with:
files: ./clover.xml
flags: phpunit-files-external-smb
6 changes: 3 additions & 3 deletions .github/workflows/files-external-webdav.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.1', '8.2', '8.3', '8.4']
include:
- php-versions: '8.2'
coverage: ${{ github.event_name != 'pull_request' }}
@@ -56,7 +56,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -91,7 +91,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@922d8d7b314a529f2be903c1e79ee8283c492863 # v4.1.1
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v4.1.1
with:
files: ./clover.xml
flags: phpunit-files-external-webdav
8 changes: 4 additions & 4 deletions .github/workflows/files-external.yml
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.1', '8.2', '8.3', '8.4']
include:
- php-versions: '8.2'
coverage: ${{ github.event_name != 'pull_request' }}
@@ -49,7 +49,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -74,12 +74,12 @@ jobs:
./occ app:enable --force files_external
- name: PHPUnit
run: composer run test:files_external \
run: composer run test:files_external -- \
${{ matrix.coverage && ' --coverage-clover ./clover.xml' || '' }}

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.xml
flags: phpunit-files-external-generic
8 changes: 4 additions & 4 deletions .github/workflows/integration-dav.yml
Original file line number Diff line number Diff line change
@@ -43,15 +43,15 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['8.3']
php-versions: ['8.1']
endpoint: ['old', 'new']
service: ['CalDAV', 'CardDAV']

name: ${{ matrix.service }} (${{ matrix.endpoint }} endpoint) php${{ matrix.php-versions }}

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -99,9 +99,9 @@ jobs:
- name: Run CalDAVTester
run: |
cp "apps/dav/tests/travis/caldavtest/serverinfo-${{ matrix.endpoint }}${{ matrix.endpoint == 'old' && (matrix.service == 'CardDAV' && '-carddav' || '-caldav') || '' }}-endpoint.xml" "apps/dav/tests/travis/caldavtest/serverinfo.xml"
cp "apps/dav/tests/testsuits/caldavtest/serverinfo-${{ matrix.endpoint }}${{ matrix.endpoint == 'old' && (matrix.service == 'CardDAV' && '-carddav' || '-caldav') || '' }}-endpoint.xml" "apps/dav/tests/testsuits/caldavtest/serverinfo.xml"
pushd CalDAVTester
PYTHONPATH="../pycalendar/src" python testcaldav.py --print-details-onfail --basedir "../apps/dav/tests/travis/caldavtest" -o cdt.txt \
PYTHONPATH="../pycalendar/src" python testcaldav.py --print-details-onfail --basedir "../apps/dav/tests/testsuits/caldavtest" -o cdt.txt \
"${{ matrix.service }}/current-user-principal.xml" \
"${{ matrix.service }}/sync-report.xml" \
${{ matrix.endpoint == 'new' && format('{0}/sharing-{1}.xml', matrix.service, matrix.service == 'CalDAV' && 'calendars' || 'addressbooks') || ';' }}
4 changes: 2 additions & 2 deletions .github/workflows/integration-litmus.yml
Original file line number Diff line number Diff line change
@@ -43,14 +43,14 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['8.3']
php-versions: ['8.1']
endpoint: ['webdav', 'dav']

name: Litmus WebDAV ${{ matrix.endpoint }}

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

2 changes: 1 addition & 1 deletion .github/workflows/integration-s3-primary.yml
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

7 changes: 4 additions & 3 deletions .github/workflows/integration-sqlite.yml
Original file line number Diff line number Diff line change
@@ -41,6 +41,7 @@ jobs:
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
- 'core/shipped.json'
integration-sqlite:
runs-on: ubuntu-latest
@@ -69,7 +70,7 @@ jobs:
- 'sharing_features'
- 'videoverification_features'

php-versions: ['8.2']
php-versions: ['8.1']
spreed-versions: ['main']

services:
@@ -90,13 +91,13 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

- name: Checkout Talk app
if: ${{ matrix.test-suite == 'videoverification_features' }}
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: nextcloud/spreed
path: apps/spreed
4 changes: 2 additions & 2 deletions .github/workflows/lint-eslint.yml
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -63,7 +63,7 @@ jobs:
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

2 changes: 1 addition & 1 deletion .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up php8.1
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
4 changes: 2 additions & 2 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
@@ -47,13 +47,13 @@ jobs:

strategy:
matrix:
php-versions: [ '8.1', '8.2', '8.3' ]
php-versions: [ '8.1', '8.2', '8.3', '8.4' ]

name: php-lint

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
51 changes: 51 additions & 0 deletions .github/workflows/lint-stylelint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Lint stylelint

on: pull_request

permissions:
contents: read

concurrency:
group: lint-stylelint-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

name: stylelint

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'

- name: Install dependencies
env:
CYPRESS_INSTALL_BINARY: 0
run: npm ci

- name: Lint
run: npm run stylelint
16 changes: 8 additions & 8 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -80,10 +80,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ needs.versions.outputs.nodeVersion }}

@@ -99,7 +99,7 @@ jobs:
run: npm run test:coverage --if-present

- name: Collect coverage
uses: codecov/codecov-action@922d8d7b314a529f2be903c1e79ee8283c492863 # v4.3.1
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v4.3.1
with:
files: ./coverage/lcov.info

@@ -114,10 +114,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ needs.versions.outputs.nodeVersion }}

@@ -142,10 +142,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ needs.versions.outputs.nodeVersion }}

4 changes: 2 additions & 2 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ jobs:
name: NPM build
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -63,7 +63,7 @@ jobs:
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

8 changes: 4 additions & 4 deletions .github/workflows/npm-audit-fix.yml
Original file line number Diff line number Diff line change
@@ -21,13 +21,13 @@ jobs:
strategy:
fail-fast: false
matrix:
branches: ['main', 'master', 'stable29', 'stable28', 'stable27']
branches: ['main', 'master', 'stable30', 'stable29', 'stable28']

name: npm-audit-fix-${{ matrix.branches }}

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ matrix.branches }}

@@ -39,7 +39,7 @@ jobs:
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

@@ -60,7 +60,7 @@ jobs:
- name: Create Pull Request
if: always()
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'fix(deps): Fix npm audit'
6 changes: 3 additions & 3 deletions .github/workflows/object-storage-azure.yml
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.1', '8.2']
include:
- php-versions: '8.3'
coverage: true
@@ -69,7 +69,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -105,7 +105,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.xml
flags: phpunit-azure
6 changes: 3 additions & 3 deletions .github/workflows/object-storage-s3.yml
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.1', '8.2']
include:
- php-versions: '8.3'
coverage: true
@@ -70,7 +70,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -111,7 +111,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.xml
flags: phpunit-s3
6 changes: 3 additions & 3 deletions .github/workflows/object-storage-swift.yml
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.1', '8.2']
include:
- php-versions: '8.3'
coverage: true
@@ -67,7 +67,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -101,7 +101,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.xml
flags: phpunit-swift
4 changes: 2 additions & 2 deletions .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
@@ -26,12 +26,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up php
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
with:
php-version: '8.2'
php-version: '8.1'
extensions: ctype, curl, dom, fileinfo, gd, json, libxml, mbstring, openssl, pcntl, pdo, posix, session, simplexml, xml, xmlreader, xmlwriter, zip, zlib
coverage: none
ini-file: development
6 changes: 3 additions & 3 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ jobs:
exit 1
- name: Checkout server before PR
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true
ref: ${{ github.event.pull_request.base.ref }}
@@ -38,7 +38,7 @@ jobs:
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@@ -91,7 +91,7 @@ jobs:

- name: Upload profiles
if: always()
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: profiles
path: |
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-32bits.yml
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

6 changes: 4 additions & 2 deletions .github/workflows/phpunit-mariadb.yml
Original file line number Diff line number Diff line change
@@ -61,6 +61,8 @@ jobs:
- php-versions: '8.3'
mariadb-versions: '10.11'
coverage: ${{ github.event_name != 'pull_request' }}
- php-versions: '8.4'
mariadb-versions: '11.4'

name: MariaDB ${{ matrix.mariadb-versions }} (PHP ${{ matrix.php-versions }}) - database tests

@@ -84,7 +86,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

@@ -122,7 +124,7 @@ jobs:

- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.db.xml
flags: phpunit-mariadb
6 changes: 3 additions & 3 deletions .github/workflows/phpunit-memcached.yml
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.1', '8.3', '8.4']
include:
- php-versions: '8.2'
coverage: ${{ github.event_name != 'pull_request' }}
@@ -71,7 +71,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -101,7 +101,7 @@ jobs:

- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.xml
flags: phpunit-memcached
184 changes: 184 additions & 0 deletions .github/workflows/phpunit-mysql-sharding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: PHPUnit sharding

on:
pull_request:
schedule:
- cron: "5 2 * * *"

permissions:
contents: read

concurrency:
group: phpunit-mysql-sharding-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest-low

outputs:
src: ${{ steps.changes.outputs.src }}

steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- '3rdparty/**'
- '**/appinfo/**'
- '**/lib/**'
- '**/templates/**'
- '**/tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
- '**.php'
phpunit-mysql:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'

strategy:
matrix:
php-versions: ['8.1']
mysql-versions: ['8.4']

name: Sharding - MySQL ${{ matrix.mysql-versions }} (PHP ${{ matrix.php-versions }}) - database tests

services:
cache:
image: ghcr.io/nextcloud/continuous-integration-redis:latest
ports:
- 6379:6379/tcp
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3

mysql:
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
ports:
- 4444:3306/tcp
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_USER: oc_autotest
MYSQL_PASSWORD: nextcloud
MYSQL_DATABASE: oc_autotest
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
shard1:
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
ports:
- 5001:3306/tcp
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_USER: oc_autotest
MYSQL_PASSWORD: nextcloud
MYSQL_DATABASE: nextcloud
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
shard2:
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
ports:
- 5002:3306/tcp
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_USER: oc_autotest
MYSQL_PASSWORD: nextcloud
MYSQL_DATABASE: nextcloud
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
shard3:
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
ports:
- 5003:3306/tcp
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_USER: oc_autotest
MYSQL_PASSWORD: nextcloud
MYSQL_DATABASE: nextcloud
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
shard4:
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
ports:
- 5004:3306/tcp
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_USER: oc_autotest
MYSQL_PASSWORD: nextcloud
MYSQL_DATABASE: nextcloud
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10

steps:
- name: Checkout server
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up dependencies
run: composer i

- name: Enable ONLY_FULL_GROUP_BY MySQL option
run: |
echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
- name: Set up Nextcloud
env:
DB_PORT: 4444
SHARDING: 1
run: |
mkdir data
cp tests/redis.config.php config/
cp tests/preseed-config.php config/config.php
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
- name: PHPUnit
run: composer run test:db ${{ matrix.coverage && ' -- --coverage-clover ./clover.db.xml' || '' }}

- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.db.xml
flags: phpunit-mysql

- name: Print logs
if: always()
run: |
cat data/nextcloud.log
summary:
permissions:
contents: none
runs-on: ubuntu-latest-low
needs: [changes, phpunit-mysql]

if: always()

name: phpunit-mysql-summary

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-mysql.result != 'success' }}; then exit 1; fi
6 changes: 4 additions & 2 deletions .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
@@ -61,6 +61,8 @@ jobs:
- mysql-versions: '8.0'
php-versions: '8.3'
coverage: ${{ github.event_name != 'pull_request' }}
- mysql-versions: '8.4'
php-versions: '8.4'

name: MySQL ${{ matrix.mysql-versions }} (PHP ${{ matrix.php-versions }}) - database tests

@@ -84,7 +86,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -122,7 +124,7 @@ jobs:

- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.db.xml
flags: phpunit-mysql
6 changes: 3 additions & 3 deletions .github/workflows/phpunit-nodb.yml
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.1', '8.3', '8.4']
include:
- php-versions: '8.2'
coverage: ${{ github.event_name != 'pull_request' }}
@@ -73,7 +73,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

@@ -106,7 +106,7 @@ jobs:

- name: Upload nodb code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.nodb.xml
flags: phpunit-nodb
121 changes: 121 additions & 0 deletions .github/workflows/phpunit-object-store-primary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: PHPUnit primary object store
on:
pull_request:
schedule:
- cron: "15 2 * * *"

concurrency:
group: phpunit-object-store-primary-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest-low

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- '3rdparty/**'
- '**/appinfo/**'
- '**/lib/**'
- '**/templates/**'
- '**/tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
- '**.php'
object-store-primary-tests-minio:
runs-on: ubuntu-latest
needs: changes

if: ${{ github.repository_owner != 'nextcloud-gmbh' && needs.changes.outputs.src != 'false' }}

strategy:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['8.1']
key: ['s3', 's3-multibucket']

name: php${{ matrix.php-versions }}-${{ matrix.key }}-minio

services:
cache:
image: ghcr.io/nextcloud/continuous-integration-redis:latest
ports:
- 6379:6379/tcp
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3

minio:
image: bitnami/minio
env:
MINIO_ROOT_USER: nextcloud
MINIO_ROOT_PASSWORD: bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ=
MINIO_DEFAULT_BUCKETS: nextcloud
ports:
- "9000:9000"

steps:
- name: Checkout server
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Nextcloud
env:
OBJECT_STORE: ${{ matrix.key }}
OBJECT_STORE_KEY: nextcloud
OBJECT_STORE_SECRET: bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ=
run: |
composer install
cp tests/redis.config.php config/
cp tests/preseed-config.php config/config.php
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
- name: Wait for S3
run: |
sleep 10
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
- name: PHPUnit
run: composer run test:db

- name: S3 logs
if: always()
run: |
cat data/nextcloud.log
docker ps -a
docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done
object-store-primary-summary:
runs-on: ubuntu-latest-low
needs: [changes,object-store-primary-tests-minio]

if: always()

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.object-store-primary-tests-minio.result != 'success' }}; then exit 1; fi
6 changes: 4 additions & 2 deletions .github/workflows/phpunit-oci.yml
Original file line number Diff line number Diff line change
@@ -66,6 +66,8 @@ jobs:
php-versions: '8.2'
- oracle-versions: '23'
php-versions: '8.3'
- oracle-versions: '23'
php-versions: '8.4'

name: Oracle ${{ matrix.oracle-versions }} (PHP ${{ matrix.php-versions }}) - database tests

@@ -96,7 +98,7 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

@@ -127,7 +129,7 @@ jobs:

- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.db.xml
flags: phpunit-oci
12 changes: 7 additions & 5 deletions .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
@@ -56,12 +56,14 @@ jobs:
strategy:
matrix:
php-versions: ['8.1']
# To keep the matrix smaller we ignore PostgreSQL '13', '14', and '15' as we already test 12 and 16 as lower and upper bound
postgres-versions: ['12', '16']
# To keep the matrix smaller we ignore PostgreSQL versions in between as we already test the minimum and the maximum
postgres-versions: ['13', '17']
include:
- php-versions: '8.3'
postgres-versions: '16'
postgres-versions: '17'
coverage: ${{ github.event_name != 'pull_request' }}
- php-versions: '8.4'
postgres-versions: '17'

name: PostgreSQL ${{ matrix.postgres-versions }} (PHP ${{ matrix.php-versions }}) - database tests

@@ -84,7 +86,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

@@ -117,7 +119,7 @@ jobs:

- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.db.xml
flags: phpunit-postgres
6 changes: 3 additions & 3 deletions .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.2', '8.3', '8.4']
include:
- php-versions: '8.1'
coverage: ${{ github.event_name != 'pull_request' }}
@@ -71,7 +71,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

@@ -105,7 +105,7 @@ jobs:

- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
files: ./clover.db.xml
flags: phpunit-sqlite
4 changes: 2 additions & 2 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: REUSE Compliance Check
uses: fsfe/reuse-action@3ae3c6bdf1257ab19397fab11fd3312144692083 # v4.0.0
uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5.0.0
1 change: 0 additions & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@ jobs:
for your contributions.
stale-issue-label: 'stale'
only-labels: 'needs info'
labels-to-remove-when-unstale: 'needs info,stale'
exempt-issue-labels: '1. to develop,2. developing,3. to review,4. to release,security'
days-before-stale: 30
days-before-close: 14
72 changes: 54 additions & 18 deletions .github/workflows/static-code-analysis.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,14 @@ name: Psalm static code analysis

on:
pull_request:
push:
branches:
- main
- master
- stable*
paths:
- '.github/workflows/static-code-analysis.yml'
- '**.php'

concurrency:
group: static-code-analysis-${{ github.head_ref || github.run_id }}
@@ -13,19 +21,19 @@ jobs:
static-code-analysis:
runs-on: ubuntu-latest

if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
if: ${{ github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }}

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

- name: Set up php
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
with:
php-version: '8.1'
extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,imagick,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -34,39 +42,39 @@ jobs:
run: composer i

- name: Psalm
run: composer run psalm:ci -- --monochrome --no-progress --output-format=github --update-baseline --report=results.sarif
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github --update-baseline

- name: Show potential changes in Psalm baseline
if: always()
run: git diff -- . ':!lib/composer'

- name: Upload Analysis results to GitHub
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
run: git diff --exit-code -- . ':!lib/composer'

static-code-analysis-security:
runs-on: ubuntu-latest

if: ${{ github.repository_owner != 'nextcloud-gmbh' }}

steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

- name: Set up php
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
with:
php-version: '8.1'
extensions: ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
extensions: ctype,curl,dom,fileinfo,ftp,gd,imagick,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none

- name: Composer install
run: composer i

- name: Psalm taint analysis
run: composer run psalm:ci -- --monochrome --no-progress --output-format=github --report=results.sarif --taint-analysis
run: composer run psalm:security -- --threads=1 --monochrome --no-progress --output-format=github --update-baseline --report=results.sarif

- name: Show potential changes in Psalm baseline
if: always()
run: git diff --exit-code -- . ':!lib/composer'

- name: Upload Security Analysis results to GitHub
if: always()
@@ -77,17 +85,19 @@ jobs:
static-code-analysis-ocp:
runs-on: ubuntu-latest

if: ${{ github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }}

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

- name: Set up php
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
with:
php-version: '8.1'
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
extensions: ctype,curl,dom,fileinfo,gd,imagick,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -96,8 +106,34 @@ jobs:
run: composer i

- name: Psalm
run: composer run psalm:ci -- -c psalm-ocp.xml --monochrome --no-progress --output-format=github --update-baseline
run: composer run psalm:ocp -- --threads=1 --monochrome --no-progress --output-format=github --update-baseline

- name: Show potential changes in Psalm baseline
if: always()
run: git diff -- . ':!lib/composer'
run: git diff --exit-code -- . ':!lib/composer'

static-code-analysis-ncu:
runs-on: ubuntu-latest

if: ${{ github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }}

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true

- name: Set up php
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
with:
php-version: '8.1'
extensions: ctype,curl,dom,fileinfo,gd,imagick,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Composer install
run: composer i

- name: Psalm
run: composer run psalm:ncu -- --threads=1 --monochrome --no-progress --output-format=github
6 changes: 3 additions & 3 deletions .github/workflows/update-cacert-bundle.yml
Original file line number Diff line number Diff line change
@@ -14,12 +14,12 @@ jobs:
strategy:
fail-fast: false
matrix:
branches: ['master', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']
branches: ['master', 'stable30', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']

name: update-ca-certificate-bundle-${{ matrix.branches }}

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ matrix.branches }}
submodules: true
@@ -28,7 +28,7 @@ jobs:
run: curl --etag-compare build/ca-bundle-etag.txt --etag-save build/ca-bundle-etag.txt --output resources/config/ca-bundle.crt https://curl.se/ca/cacert.pem

- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'fix(security): Update CA certificate bundle'
6 changes: 3 additions & 3 deletions .github/workflows/update-code-signing-crl.yml
Original file line number Diff line number Diff line change
@@ -14,12 +14,12 @@ jobs:
strategy:
fail-fast: false
matrix:
branches: ['master', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']
branches: ['master', 'stable30', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']

name: update-code-signing-crl-${{ matrix.branches }}

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ matrix.branches }}
submodules: true
@@ -31,7 +31,7 @@ jobs:
run: openssl crl -verify -in resources/codesigning/root.crl -CAfile resources/codesigning/root.crt -noout

- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'fix(security): Update code signing revocation list'
52 changes: 0 additions & 52 deletions .github/workflows/update-psalm-baseline-approve-merge.yml

This file was deleted.

69 changes: 0 additions & 69 deletions .github/workflows/update-psalm-baseline.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@
!/apps/lookup_server_connector
!/apps/user_ldap
!/apps/oauth2
!/apps/profile
!/apps/provisioning_api
!/apps/settings
!/apps/systemtags
@@ -151,6 +152,7 @@ Vagrantfile

# Tests - auto-generated files
/data-autotest
/results.sarif
/tests/.phpunit.result.cache
/tests/coverage*
/tests/css
27 changes: 21 additions & 6 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -15,11 +15,18 @@

<IfModule mod_env.c>
# Add security and privacy related headers

# Avoid doubled headers by unsetting headers in "onsuccess" table,
# then add headers to "always" table: https://github.com/nextcloud/server/pull/19002
Header onsuccess unset Referrer-Policy
Header always set Referrer-Policy "no-referrer"

<If "%{REQUEST_URI} =~ m#/login$#">
# Only on the login page we need any Origin or Referer header set.
Header onsuccess unset Referrer-Policy
Header always set Referrer-Policy "same-origin"
</If>
<Else>
Header onsuccess unset Referrer-Policy
Header always set Referrer-Policy "no-referrer"
</Else>

Header onsuccess unset X-Content-Type-Options
Header always set X-Content-Type-Options "nosniff"
@@ -49,8 +56,8 @@
</Else>
</FilesMatch>

# Let browsers cache WOFF files for a week
<FilesMatch "\.woff2?$">
# Let browsers cache OTF and WOFF files for a week
<FilesMatch "\.(otf|woff2?)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
</IfModule>
@@ -103,7 +110,15 @@
# - https://docs.cyberduck.io/mountainduck/issues/fastcgi/
# - https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#troubleshooting-webdav
<IfModule mod_setenvif.c>
SetEnvIf Transfer-Encoding "chunked" proxy-sendcl=1
SetEnvIfNoCase Transfer-Encoding "chunked" proxy-sendcl=1
</IfModule>

# Apache disabled the sending of the server-side content-length header
# in their 2.4.59 patch updated which breaks some use-cases in Nextcloud.
# Setting ap_trust_cgilike_cl allows to bring back the usual behaviour.
# See https://bz.apache.org/bugzilla/show_bug.cgi?id=68973
<IfModule mod_env.c>
SetEnv ap_trust_cgilike_cl
</IfModule>

AddDefaultCharset utf-8
32 changes: 13 additions & 19 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -14,29 +14,23 @@
$config
->setParallelConfig(ParallelConfigFactory::detect())
->getFinder()
->ignoreVCSIgnored(true)
->exclude('config')
->exclude('data')
->notPath('3rdparty')
->notPath('build/integration/vendor')
->notPath('build/lib')
->notPath('build/node_modules')
->notPath('build/stubs')
->notPath('composer')
->notPath('node_modules')
->notPath('vendor')
->in('apps')
->exclude('3rdparty')
->exclude('build/stubs')
->exclude('composer')
->in(__DIR__);

// Ignore additional app directories
$rootDir = new \DirectoryIterator(__DIR__);
foreach ($rootDir as $node) {
if (str_starts_with($node->getFilename(), 'apps')) {
$return = shell_exec('git check-ignore ' . escapeshellarg($node->getFilename() . '/'));
$ignoredEntries = shell_exec('git status --porcelain --ignored ' . escapeshellarg(__DIR__));
$ignoredEntries = explode("\n", $ignoredEntries);
$ignoredEntries = array_filter($ignoredEntries, static fn (string $line) => str_starts_with($line, '!! '));
$ignoredEntries = array_map(static fn (string $line) => substr($line, 3), $ignoredEntries);
$ignoredEntries = array_values($ignoredEntries);

if ($return !== null) {
$config->getFinder()->exclude($node->getFilename());
}
foreach ($ignoredEntries as $ignoredEntry) {
if (str_ends_with($ignoredEntry, '/')) {
$config->getFinder()->exclude($ignoredEntry);
} else {
$config->getFinder()->notPath($ignoredEntry);
}
}

30 changes: 17 additions & 13 deletions .reuse/dep5

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -116,6 +116,12 @@ source_file = translationfiles/templates/oauth2.pot
source_lang = en
type = PO

[o:nextcloud:p:nextcloud:r:profile]
file_filter = translationfiles/<lang>/profile.po
source_file = translationfiles/templates/profile.pot
source_lang = en
type = PO

[o:nextcloud:p:nextcloud:r:provisioning_api]
file_filter = translationfiles/<lang>/provisioning_api.po
source_file = translationfiles/templates/provisioning_api.pot
@@ -176,6 +182,12 @@ source_file = translationfiles/templates/weather_status.pot
source_lang = en
type = PO

[o:nextcloud:p:nextcloud:r:webhook_listeners]
file_filter = translationfiles/<lang>/webhook_listeners.po
source_file = translationfiles/templates/webhook_listeners.pot
source_lang = en
type = PO

[o:nextcloud:p:nextcloud:r:workflowengine]
file_filter = translationfiles/<lang>/workflowengine.po
source_file = translationfiles/templates/workflowengine.pot
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 1743 files
2 changes: 1 addition & 1 deletion LICENSES/LicenseRef-NextcloudTrademarks.txt
Original file line number Diff line number Diff line change
@@ -6,4 +6,4 @@ and our products: “Nextcloud Files”; “Nextcloud Groupware” and “Nextcl
This set of marks is collectively referred to as the “Nextcloud marks.”

Use of Nextcloud logos and other marks is only permitted under the guidelines provided by the Nextcloud GmbH.
A copy can be found at https://discord.com/branding
A copy can be found at https://nextcloud.com/trademarks/
39 changes: 0 additions & 39 deletions LICENSES/LicenseRef-freepikLicense.txt

This file was deleted.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -74,6 +74,10 @@ Otherwise, git checkouts can be handled the same as release archives, by using t

- Comment on a pull request with `/update-3rdparty` to update the 3rd party submodule. It will update to the last commit of the 3rd party branch named like the PR target.

#### Ignore code style updates in git blame

`git config blame.ignoreRevsFile .git-blame-ignore-revs`

## Contribution guidelines 📜

All contributions to this repository from June 16, 2016, and onward are considered to be
14 changes: 7 additions & 7 deletions __mocks__/@nextcloud/dialogs.ts
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { jest } from '@jest/globals'
import { vi } from 'vitest'

export const showMessage = jest.fn()
export const showSuccess = jest.fn()
export const showWarning = jest.fn()
export const showInfo = jest.fn()
export const showError = jest.fn()
export const showUndo = jest.fn()
export const showMessage = vi.fn()
export const showSuccess = vi.fn()
export const showWarning = vi.fn()
export const showInfo = vi.fn()
export const showError = vi.fn()
export const showUndo = vi.fn()
12 changes: 0 additions & 12 deletions __tests__/jest-setup.ts

This file was deleted.

3 changes: 2 additions & 1 deletion __tests__/mock-window.js
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

window.OC = { ...window.OC }
window.OCA = { ...window.OCA }
window.OCP = { ...window.OCP }

window._oc_webroot = ''
6 changes: 6 additions & 0 deletions __tests__/setup-testing-library.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: CC0-1.0
*/
import '@testing-library/jest-dom/vitest'
import 'core-js/stable/index.js'
6 changes: 0 additions & 6 deletions __tests__/tsconfig.json

This file was deleted.

4 changes: 2 additions & 2 deletions apps/admin_audit/appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
<name>Auditing / Logging</name>
<summary>Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions.</summary>
<description>Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions.</description>
<version>1.20.0</version>
<version>1.21.0</version>
<licence>agpl</licence>
<author>Nextcloud</author>
<namespace>AdminAudit</namespace>
@@ -20,7 +20,7 @@
<category>monitoring</category>
<bugs>https://github.com/nextcloud/server/issues</bugs>
<dependencies>
<nextcloud min-version="30" max-version="30"/>
<nextcloud min-version="31" max-version="31"/>
</dependencies>
<background-jobs>
<job>OCA\AdminAudit\BackgroundJobs\Rotate</job>
14 changes: 8 additions & 6 deletions apps/admin_audit/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
@@ -8,20 +8,22 @@
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'OCA\\AdminAudit\\Actions\\Action' => $baseDir . '/../lib/Actions/Action.php',
'OCA\\AdminAudit\\Actions\\AppManagement' => $baseDir . '/../lib/Actions/AppManagement.php',
'OCA\\AdminAudit\\Actions\\Auth' => $baseDir . '/../lib/Actions/Auth.php',
'OCA\\AdminAudit\\Actions\\Console' => $baseDir . '/../lib/Actions/Console.php',
'OCA\\AdminAudit\\Actions\\Files' => $baseDir . '/../lib/Actions/Files.php',
'OCA\\AdminAudit\\Actions\\GroupManagement' => $baseDir . '/../lib/Actions/GroupManagement.php',
'OCA\\AdminAudit\\Actions\\Security' => $baseDir . '/../lib/Actions/Security.php',
'OCA\\AdminAudit\\Actions\\Sharing' => $baseDir . '/../lib/Actions/Sharing.php',
'OCA\\AdminAudit\\Actions\\TagManagement' => $baseDir . '/../lib/Actions/TagManagement.php',
'OCA\\AdminAudit\\Actions\\Trashbin' => $baseDir . '/../lib/Actions/Trashbin.php',
'OCA\\AdminAudit\\Actions\\UserManagement' => $baseDir . '/../lib/Actions/UserManagement.php',
'OCA\\AdminAudit\\Actions\\Versions' => $baseDir . '/../lib/Actions/Versions.php',
'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
'OCA\\AdminAudit\\AuditLogger' => $baseDir . '/../lib/AuditLogger.php',
'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir . '/../lib/BackgroundJobs/Rotate.php',
'OCA\\AdminAudit\\IAuditLogger' => $baseDir . '/../lib/IAuditLogger.php',
'OCA\\AdminAudit\\Listener\\AppManagementEventListener' => $baseDir . '/../lib/Listener/AppManagementEventListener.php',
'OCA\\AdminAudit\\Listener\\AuthEventListener' => $baseDir . '/../lib/Listener/AuthEventListener.php',
'OCA\\AdminAudit\\Listener\\ConsoleEventListener' => $baseDir . '/../lib/Listener/ConsoleEventListener.php',
'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => $baseDir . '/../lib/Listener/CriticalActionPerformedEventListener.php',
'OCA\\AdminAudit\\Listener\\FileEventListener' => $baseDir . '/../lib/Listener/FileEventListener.php',
'OCA\\AdminAudit\\Listener\\GroupManagementEventListener' => $baseDir . '/../lib/Listener/GroupManagementEventListener.php',
'OCA\\AdminAudit\\Listener\\SecurityEventListener' => $baseDir . '/../lib/Listener/SecurityEventListener.php',
'OCA\\AdminAudit\\Listener\\SharingEventListener' => $baseDir . '/../lib/Listener/SharingEventListener.php',
'OCA\\AdminAudit\\Listener\\UserManagementEventListener' => $baseDir . '/../lib/Listener/UserManagementEventListener.php',
);
14 changes: 8 additions & 6 deletions apps/admin_audit/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
@@ -23,22 +23,24 @@ class ComposerStaticInitAdminAudit
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'OCA\\AdminAudit\\Actions\\Action' => __DIR__ . '/..' . '/../lib/Actions/Action.php',
'OCA\\AdminAudit\\Actions\\AppManagement' => __DIR__ . '/..' . '/../lib/Actions/AppManagement.php',
'OCA\\AdminAudit\\Actions\\Auth' => __DIR__ . '/..' . '/../lib/Actions/Auth.php',
'OCA\\AdminAudit\\Actions\\Console' => __DIR__ . '/..' . '/../lib/Actions/Console.php',
'OCA\\AdminAudit\\Actions\\Files' => __DIR__ . '/..' . '/../lib/Actions/Files.php',
'OCA\\AdminAudit\\Actions\\GroupManagement' => __DIR__ . '/..' . '/../lib/Actions/GroupManagement.php',
'OCA\\AdminAudit\\Actions\\Security' => __DIR__ . '/..' . '/../lib/Actions/Security.php',
'OCA\\AdminAudit\\Actions\\Sharing' => __DIR__ . '/..' . '/../lib/Actions/Sharing.php',
'OCA\\AdminAudit\\Actions\\TagManagement' => __DIR__ . '/..' . '/../lib/Actions/TagManagement.php',
'OCA\\AdminAudit\\Actions\\Trashbin' => __DIR__ . '/..' . '/../lib/Actions/Trashbin.php',
'OCA\\AdminAudit\\Actions\\UserManagement' => __DIR__ . '/..' . '/../lib/Actions/UserManagement.php',
'OCA\\AdminAudit\\Actions\\Versions' => __DIR__ . '/..' . '/../lib/Actions/Versions.php',
'OCA\\AdminAudit\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
'OCA\\AdminAudit\\AuditLogger' => __DIR__ . '/..' . '/../lib/AuditLogger.php',
'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => __DIR__ . '/..' . '/../lib/BackgroundJobs/Rotate.php',
'OCA\\AdminAudit\\IAuditLogger' => __DIR__ . '/..' . '/../lib/IAuditLogger.php',
'OCA\\AdminAudit\\Listener\\AppManagementEventListener' => __DIR__ . '/..' . '/../lib/Listener/AppManagementEventListener.php',
'OCA\\AdminAudit\\Listener\\AuthEventListener' => __DIR__ . '/..' . '/../lib/Listener/AuthEventListener.php',
'OCA\\AdminAudit\\Listener\\ConsoleEventListener' => __DIR__ . '/..' . '/../lib/Listener/ConsoleEventListener.php',
'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => __DIR__ . '/..' . '/../lib/Listener/CriticalActionPerformedEventListener.php',
'OCA\\AdminAudit\\Listener\\FileEventListener' => __DIR__ . '/..' . '/../lib/Listener/FileEventListener.php',
'OCA\\AdminAudit\\Listener\\GroupManagementEventListener' => __DIR__ . '/..' . '/../lib/Listener/GroupManagementEventListener.php',
'OCA\\AdminAudit\\Listener\\SecurityEventListener' => __DIR__ . '/..' . '/../lib/Listener/SecurityEventListener.php',
'OCA\\AdminAudit\\Listener\\SharingEventListener' => __DIR__ . '/..' . '/../lib/Listener/SharingEventListener.php',
'OCA\\AdminAudit\\Listener\\UserManagementEventListener' => __DIR__ . '/..' . '/../lib/Listener/UserManagementEventListener.php',
);

public static function getInitializer(ClassLoader $loader)
7 changes: 7 additions & 0 deletions apps/admin_audit/l10n/lv.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OC.L10N.register(
"admin_audit",
{
"Auditing / Logging" : "Auditēšana / Žurnalizēšana",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Nodrošina Nextcloud žurnalizēšanas iespējas, piemēram, faila piekļuves žurnalizēšanu vai citas sensitīvas darbības."
},
"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);");
5 changes: 5 additions & 0 deletions apps/admin_audit/l10n/lv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ "translations": {
"Auditing / Logging" : "Auditēšana / Žurnalizēšana",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Nodrošina Nextcloud žurnalizēšanas iespējas, piemēram, faila piekļuves žurnalizēšanu vai citas sensitīvas darbības."
},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"
}
7 changes: 7 additions & 0 deletions apps/admin_audit/l10n/ms_MY.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OC.L10N.register(
"admin_audit",
{
"Auditing / Logging" : "Pengauditan / Pengelogan",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Menyediakan kebolehan pengelogan untuk Nextcloud seperti akses fail log atau tindakan sensitif."
},
"nplurals=1; plural=0;");
5 changes: 5 additions & 0 deletions apps/admin_audit/l10n/ms_MY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ "translations": {
"Auditing / Logging" : "Pengauditan / Pengelogan",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Menyediakan kebolehan pengelogan untuk Nextcloud seperti akses fail log atau tindakan sensitif."
},"pluralForm" :"nplurals=1; plural=0;"
}
7 changes: 7 additions & 0 deletions apps/admin_audit/l10n/ug.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OC.L10N.register(
"admin_audit",
{
"Auditing / Logging" : "ئىقتىسادىي تەپتىش / خاتىرىلەش",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Nextcloud غا تىزىمغا كىرىش ئىقتىدارى بىلەن تەمىنلەيدۇ ، مەسىلەن ھۆججەتلەرنى زىيارەت قىلىش ياكى باشقا سەزگۈر ھەرىكەتلەر."
},
"nplurals=2; plural=(n != 1);");
5 changes: 5 additions & 0 deletions apps/admin_audit/l10n/ug.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ "translations": {
"Auditing / Logging" : "ئىقتىسادىي تەپتىش / خاتىرىلەش",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Nextcloud غا تىزىمغا كىرىش ئىقتىدارى بىلەن تەمىنلەيدۇ ، مەسىلەن ھۆججەتلەرنى زىيارەت قىلىش ياكى باشقا سەزگۈر ھەرىكەتلەر."
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
4 changes: 2 additions & 2 deletions apps/admin_audit/l10n/vi.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OC.L10N.register(
"admin_audit",
{
"Auditing / Logging" : "Kiểm tra / Nhật ký",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Cung cấp khả năng ghi nhật ký cho Nextcloud, chẳng hạn như ghi nhật ký quyền truy cập tệp hoặc các hành động nhạy cảm khác."
"Auditing / Logging" : "Kiểm tra / Nhật ký",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Cung cấp khả năng ghi nhật ký cho Nextcloud, chẳng hạn như ghi nhật ký quyền truy cập tệp hoặc các hành động nhạy cảm khác."
},
"nplurals=1; plural=0;");
4 changes: 2 additions & 2 deletions apps/admin_audit/l10n/vi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ "translations": {
"Auditing / Logging" : "Kiểm tra / Nhật ký",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Cung cấp khả năng ghi nhật ký cho Nextcloud, chẳng hạn như ghi nhật ký quyền truy cập tệp hoặc các hành động nhạy cảm khác."
"Auditing / Logging" : "Kiểm tra / Nhật ký",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Cung cấp khả năng ghi nhật ký cho Nextcloud, chẳng hạn như ghi nhật ký quyền truy cập tệp hoặc các hành động nhạy cảm khác."
},"pluralForm" :"nplurals=1; plural=0;"
}
4 changes: 2 additions & 2 deletions apps/admin_audit/l10n/zh_TW.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OC.L10N.register(
"admin_audit",
{
"Auditing / Logging" : "稽核記錄",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "提供 Nextcloud 的記錄功能,例如記錄檔存取或其他敏感操作。"
"Auditing / Logging" : "稽核/記錄",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "提供 Nextcloud 的記錄功能,例如紀錄檔存取,或其他敏感操作。"
},
"nplurals=1; plural=0;");
4 changes: 2 additions & 2 deletions apps/admin_audit/l10n/zh_TW.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ "translations": {
"Auditing / Logging" : "稽核記錄",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "提供 Nextcloud 的記錄功能,例如記錄檔存取或其他敏感操作。"
"Auditing / Logging" : "稽核/記錄",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "提供 Nextcloud 的記錄功能,例如紀錄檔存取,或其他敏感操作。"
},"pluralForm" :"nplurals=1; plural=0;"
}
4 changes: 2 additions & 2 deletions apps/admin_audit/lib/Actions/Action.php
Original file line number Diff line number Diff line change
@@ -32,13 +32,13 @@ public function log(string $text,
if (!isset($params[$element])) {
if ($obfuscateParameters) {
$this->logger->critical(
'$params["'.$element.'"] was missing.',
'$params["' . $element . '"] was missing.',
['app' => 'admin_audit']
);
} else {
$this->logger->critical(
sprintf(
'$params["'.$element.'"] was missing. Transferred value: %s',
'$params["' . $element . '"] was missing. Transferred value: %s',
print_r($params, true)
),
['app' => 'admin_audit']
42 changes: 0 additions & 42 deletions apps/admin_audit/lib/Actions/AppManagement.php

This file was deleted.

45 changes: 0 additions & 45 deletions apps/admin_audit/lib/Actions/Auth.php

This file was deleted.

28 changes: 0 additions & 28 deletions apps/admin_audit/lib/Actions/Console.php

This file was deleted.

110 changes: 22 additions & 88 deletions apps/admin_audit/lib/Actions/Files.php
Original file line number Diff line number Diff line change
@@ -8,17 +8,16 @@
namespace OCA\AdminAudit\Actions;

use OC\Files\Node\NonExistingFile;
use OCP\Files\Events\Node\BeforeNodeDeletedEvent;
use OCP\Files\Events\Node\BeforeNodeReadEvent;
use OCP\Files\Events\Node\BeforeNodeRenamedEvent;
use OCP\Files\Events\Node\BeforeNodeWrittenEvent;
use OCP\Files\Events\Node\NodeCopiedEvent;
use OCP\Files\Events\Node\NodeCreatedEvent;
use OCP\Files\Events\Node\NodeDeletedEvent;
use OCP\Files\Events\Node\NodeRenamedEvent;
use OCP\Files\Events\Node\NodeWrittenEvent;
use OCP\Files\InvalidPathException;
use OCP\Files\NotFoundException;
use OCP\Preview\BeforePreviewFetchedEvent;
use OCP\Server;
use Psr\Log\LoggerInterface;

/**
@@ -29,10 +28,9 @@
class Files extends Action {

private array $renamedNodes = [];

/**
* Logs file read actions
*
* @param BeforeNodeReadEvent $event
*/
public function read(BeforeNodeReadEvent $event): void {
try {
@@ -42,8 +40,8 @@ public function read(BeforeNodeReadEvent $event): void {
'path' => mb_substr($node->getInternalPath(), 5),
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
"Exception thrown in file read: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
Server::get(LoggerInterface::class)->error(
'Exception thrown in file read: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -56,25 +54,21 @@ public function read(BeforeNodeReadEvent $event): void {

/**
* Logs rename actions of files
*
* @param BeforeNodeRenamedEvent $event
*/
public function beforeRename(BeforeNodeRenamedEvent $event): void {
try {
$source = $event->getSource();
$this->renamedNodes[$source->getId()] = $source;
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
"Exception thrown in file rename: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
Server::get(LoggerInterface::class)->error(
'Exception thrown in file rename: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
}

/**
* Logs rename actions of files
*
* @param NodeRenamedEvent $event
*/
public function afterRename(NodeRenamedEvent $event): void {
try {
@@ -86,8 +80,8 @@ public function afterRename(NodeRenamedEvent $event): void {
'newpath' => mb_substr($target->getInternalPath(), 5),
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
"Exception thrown in file rename: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
Server::get(LoggerInterface::class)->error(
'Exception thrown in file rename: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -102,8 +96,6 @@ public function afterRename(NodeRenamedEvent $event): void {

/**
* Logs creation of files
*
* @param NodeCreatedEvent $event
*/
public function create(NodeCreatedEvent $event): void {
try {
@@ -112,8 +104,8 @@ public function create(NodeCreatedEvent $event): void {
'path' => mb_substr($event->getNode()->getInternalPath(), 5),
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
"Exception thrown in file create: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
Server::get(LoggerInterface::class)->error(
'Exception thrown in file create: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -129,8 +121,6 @@ public function create(NodeCreatedEvent $event): void {

/**
* Logs copying of files
*
* @param NodeCopiedEvent $event
*/
public function copy(NodeCopiedEvent $event): void {
try {
@@ -141,8 +131,8 @@ public function copy(NodeCopiedEvent $event): void {
'newpath' => mb_substr($event->getTarget()->getInternalPath(), 5),
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
"Exception thrown in file copy: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
Server::get(LoggerInterface::class)->error(
'Exception thrown in file copy: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -155,18 +145,17 @@ public function copy(NodeCopiedEvent $event): void {

/**
* Logs writing of files
*
* @param BeforeNodeWrittenEvent $event
*/
public function write(BeforeNodeWrittenEvent $event): void {
public function write(NodeWrittenEvent $event): void {
$node = $event->getNode();
try {
$params = [
'id' => $event->getNode()->getId(),
'path' => mb_substr($event->getNode()->getInternalPath(), 5),
'id' => $node->getId(),
'path' => mb_substr($node->getInternalPath(), 5),
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
"Exception thrown in file write: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
Server::get(LoggerInterface::class)->error(
'Exception thrown in file write: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -181,44 +170,18 @@ public function write(BeforeNodeWrittenEvent $event): void {
);
}

/**
* Logs update of files
*
* @param NodeWrittenEvent $event
*/
public function update(NodeWrittenEvent $event): void {
try {
$params = [
'id' => $event->getNode()->getId(),
'path' => mb_substr($event->getNode()->getInternalPath(), 5),
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
"Exception thrown in file update: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
$this->log(
'File with id "%s" updated: "%s"',
$params,
array_keys($params)
);
}

/**
* Logs deletions of files
*
* @param NodeDeletedEvent $event
*/
public function delete(NodeDeletedEvent $event): void {
public function delete(BeforeNodeDeletedEvent $event): void {
try {
$params = [
'id' => $event->getNode()->getId(),
'path' => mb_substr($event->getNode()->getInternalPath(), 5),
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
"Exception thrown in file delete: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
Server::get(LoggerInterface::class)->error(
'Exception thrown in file delete: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -228,33 +191,4 @@ public function delete(NodeDeletedEvent $event): void {
array_keys($params)
);
}

/**
* Logs preview access to a file
*
* @param BeforePreviewFetchedEvent $event
*/
public function preview(BeforePreviewFetchedEvent $event): void {
try {
$file = $event->getNode();
$params = [
'id' => $file->getId(),
'width' => $event->getWidth(),
'height' => $event->getHeight(),
'crop' => $event->isCrop(),
'mode' => $event->getMode(),
'path' => mb_substr($file->getInternalPath(), 5)
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
"Exception thrown in file preview: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
$this->log(
'Preview accessed: (id: "%s", width: "%s", height: "%s" crop: "%s", mode: "%s", path: "%s")',
$params,
array_keys($params)
);
}
}
87 changes: 0 additions & 87 deletions apps/admin_audit/lib/Actions/GroupManagement.php

This file was deleted.

60 changes: 0 additions & 60 deletions apps/admin_audit/lib/Actions/Security.php

This file was deleted.

Loading