mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-15 02:00:15 +00:00
Compare commits
3 commits
0b5a4b3e01
...
68f76a02b6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68f76a02b6 | ||
|
|
31a97682ff | ||
|
|
22a784a3de |
6 changed files with 47 additions and 5 deletions
39
.github/workflows/lint-yaml.yml
vendored
Normal file
39
.github/workflows/lint-yaml.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# 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 YAML
|
||||
|
||||
on: pull_request
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
yaml-lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
name: yaml
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: GitHub action templates lint
|
||||
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3.1.1
|
||||
with:
|
||||
file_or_dir: .github/workflows
|
||||
config_data: |
|
||||
line-length: warning
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
|
||||
|
||||
- name: Check GitHub actions
|
||||
run: uvx zizmor --min-severity medium .github/workflows/*.yml
|
||||
|
|
@ -30,7 +30,7 @@ readonly class AuthManager {
|
|||
$_SESSION['date_time'] = $dateTime;
|
||||
|
||||
$df = disk_free_space(DataConst::GetSessionDirectory());
|
||||
if ($df !== false && (int)$df < 10240) {
|
||||
if ($df !== false && intval($df) < 10240) {
|
||||
error_log(DataConst::GetSessionDirectory() . " has only less than 10KB free space. The login might not succeed because of that!");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ $id = 'nextcloud-aio-nextcloud';
|
|||
$nextcloudContainer = $containerDefinitionFetcher->GetContainerById($id);
|
||||
|
||||
$df = disk_free_space(DataConst::GetDataDirectory());
|
||||
if ($df !== false && (int)$df < 1024 * 1024 * 1024 * 5) {
|
||||
if ($df !== false && intval($df) < 1024 * 1024 * 1024 * 5) {
|
||||
error_log("The drive that hosts the mastercontainer volume has less than 5 GB free space. Container updates and backups might not succeed due to that!");
|
||||
$dockerActionManger->sendNotification($nextcloudContainer, 'Low on space!', 'The drive that hosts the mastercontainer volume has less than 5 GB free space. Container updates and backups might not succeed due to that!');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -606,7 +606,7 @@ class ConfigurationManager
|
|||
$df = disk_free_space(DataConst::GetDataDirectory());
|
||||
$content = json_encode($config, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR);
|
||||
$size = strlen($content) + 10240;
|
||||
if ($df !== false && (int)$df < $size) {
|
||||
if ($df !== false && intval($df) < $size) {
|
||||
throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not have enough space for writing the config file! Not writing it back!");
|
||||
}
|
||||
file_put_contents(DataConst::GetConfigFile(), $content);
|
||||
|
|
@ -710,7 +710,7 @@ class ConfigurationManager
|
|||
}
|
||||
|
||||
public function GetApacheMaxSize() : int {
|
||||
$uploadLimit = (int)rtrim($this->GetNextcloudUploadLimit(), 'G');
|
||||
$uploadLimit = intval(rtrim($this->GetNextcloudUploadLimit(), 'G'));
|
||||
return $uploadLimit * 1024 * 1024 * 1024;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ readonly class DockerActionManager {
|
|||
}
|
||||
|
||||
if ($internalPort !== "" && $internalPort !== 'host') {
|
||||
$connection = @fsockopen($containerName, (int)$internalPort, $errno, $errstr, 0.2);
|
||||
$connection = @fsockopen($containerName, intval($internalPort), $errno, $errstr, 0.2);
|
||||
if ($connection) {
|
||||
fclose($connection);
|
||||
return ContainerState::Running;
|
||||
|
|
|
|||
3
zizmor.yml
Normal file
3
zizmor.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
rules:
|
||||
excessive-permissions:
|
||||
disable: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue