diff --git a/Dockerfile.Nextcloud b/Dockerfile.Nextcloud index 2f7c9b52..96db1d6f 100644 --- a/Dockerfile.Nextcloud +++ b/Dockerfile.Nextcloud @@ -5,4 +5,12 @@ FROM nextcloud:${NEXTCLOUD_VERSION} RUN apt update && apt install -y less vim telnet iputils-ping ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN install-php-extensions gd xdebug +RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" +RUN sed -i 's/max_execution_time = 30/max_execution_time = -1/g' "$PHP_INI_DIR/php.ini" +RUN sed -i 's/max_input_time = 60/max_input_time = -1/g' "$PHP_INI_DIR/php.ini" +RUN sed -i 's/memory_limit = 128M/memory_limit = -1/g' "$PHP_INI_DIR/php.ini" +RUN echo "error_log = /var/www/html/data/php.log" >> "$PHP_INI_DIR/php.ini" + +COPY opcache-disabled.ini /usr/local/etc/php/conf.d/opcache-recommended.ini +COPY opcache-blacklist.txt /usr/local/etc/php/conf.d/opcache-blacklist.txt COPY xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini diff --git a/Makefile b/Makefile index a07f5e7d..f1876e53 100644 --- a/Makefile +++ b/Makefile @@ -121,6 +121,8 @@ appstore: build tar czf $(appstore_package_name).tar.gz \ --transform s/$(app_directory_name)/$(app_real_name)/ \ --exclude-vcs \ + --exclude="../$(app_directory_name)/opcache-disabled.ini" \ + --exclude="../$(app_directory_name)/opcache-blacklist.txt" \ --exclude="../$(app_directory_name)/artifacts" \ --exclude="../$(app_directory_name)/tmp*" \ --exclude="../$(app_directory_name)/Dockerfile*" \ diff --git a/compose-install.yaml b/compose-install.yaml index 024d983f..6f3498e0 100644 --- a/compose-install.yaml +++ b/compose-install.yaml @@ -6,7 +6,7 @@ services: args: - NEXTCLOUD_VERSION=${NEXTCLOUD_VERSION:-29.0.3} environment: - - XDEBUG_MODE=${XDEBUG_MODE:-develop} + XDEBUG_MODE: ${XDEBUG_MODE:-develop} ports: - "80:80" container_name: nextcloud-container diff --git a/lib/Service/VerdictService.php b/lib/Service/VerdictService.php index 448f9017..84b7e8cb 100644 --- a/lib/Service/VerdictService.php +++ b/lib/Service/VerdictService.php @@ -126,7 +126,6 @@ public static function isFileTooLargeToScan(string $path): bool { return ($size === false) || $size > self::MAX_FILE_SIZE; } - /** * Scans a file for malicious content with G DATA Verdict-as-a-Service and returns the verdict. * @param string $filePath The local path to the file to scan. @@ -229,12 +228,12 @@ public function removeWhitespacesAroundComma(string $s): string { return trim(preg_replace('/\s*,\s*/', ',', $s)); } - /** - * @param string $authMethod - * @return ClientCredentialsGrantAuthenticator|ResourceOwnerPasswordGrantAuthenticator - * @throws VaasAuthenticationException - */ - public function getAuthenticator(string $authMethod): ClientCredentialsGrantAuthenticator|ResourceOwnerPasswordGrantAuthenticator { + /** + * @param string $authMethod + * @return ClientCredentialsGrantAuthenticator|ResourceOwnerPasswordGrantAuthenticator + * @throws VaasAuthenticationException + */ + public function getAuthenticator(string $authMethod): ClientCredentialsGrantAuthenticator|ResourceOwnerPasswordGrantAuthenticator { if ($authMethod === 'ResourceOwnerPassword') { return new ResourceOwnerPasswordGrantAuthenticator( "nextcloud-customer", @@ -249,8 +248,8 @@ public function getAuthenticator(string $authMethod): ClientCredentialsGrantAuth $this->tokenEndpoint ); } else { - throw new VaasAuthenticationException("Invalid auth method: " . $authMethod); - } + throw new VaasAuthenticationException("Invalid auth method: " . $authMethod); + } } /** diff --git a/opcache-blacklist.txt b/opcache-blacklist.txt new file mode 100644 index 00000000..87371f22 --- /dev/null +++ b/opcache-blacklist.txt @@ -0,0 +1,367 @@ +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/TimeoutException.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Cancellation.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Internal/WrappedCancellation.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Internal/FutureIterator.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Internal/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Internal/FutureState.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Internal/Cancellable.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Internal/FutureIteratorQueue.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/CancelledException.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/CompositeCancellation.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/DeferredCancellation.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/SignalCancellation.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/CompositeException.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Closable.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/CompositeLengthException.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/SignalException.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/DeferredFuture.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Future.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/ForbidCloning.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/ForbidSerialization.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/TimeoutCancellation.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Future/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/Future/UnhandledFutureError.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/src/NullCancellation.php +/var/www/html/apps/gdatavaas/vendor/amphp/amp/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/amp/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/amp/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/windows-registry/.php-cs-fixer.dist.php +/var/www/html/apps/gdatavaas/vendor/amphp/windows-registry/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/windows-registry/src/WindowsRegistry.php +/var/www/html/apps/gdatavaas/vendor/amphp/windows-registry/src/KeyNotFoundException.php +/var/www/html/apps/gdatavaas/vendor/amphp/windows-registry/composer-require-check.json +/var/www/html/apps/gdatavaas/vendor/amphp/windows-registry/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/windows-registry/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/windows-registry/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/dns/.php-cs-fixer.dist.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/WindowsDnsConfigLoader.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/Internal/UdpSocket.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/Internal/TcpSocket.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/Internal/Socket.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/Rfc1035StubDnsResolver.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/DnsRecord.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/DnsConfigLoader.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/DnsResolver.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/DnsTimeoutException.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/DnsConfig.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/BlockingFallbackDnsResolver.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/InvalidNameException.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/DnsConfigException.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/MissingDnsRecordException.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/HostLoader.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/DnsException.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/UnixDnsConfigLoader.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/src/StaticDnsConfigLoader.php +/var/www/html/apps/gdatavaas/vendor/amphp/dns/composer-require-check.json +/var/www/html/apps/gdatavaas/vendor/amphp/dns/CONTRIBUTING.md +/var/www/html/apps/gdatavaas/vendor/amphp/dns/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/dns/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/dns/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/dns/phpunit.xml.dist +/var/www/html/apps/gdatavaas/vendor/amphp/dns/README.md +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/.php-cs-fixer.dist.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/ConcurrentChainedIterator.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/ConcurrentArrayIterator.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/FlatMapOperation.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/ConcurrentIterableIterator.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/IntermediateOperation.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/QueueState.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/SortOperation.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/ConcurrentQueueIterator.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/Sequence.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/ConcurrentClosureIterator.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/ConcurrentMergedIterator.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Internal/ConcurrentFlatMapIterator.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Pipeline.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/Queue.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/DisposedException.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/src/ConcurrentIterator.php +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/composer-require-check.json +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/pipeline/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/.php-cs-fixer.dist.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Internal/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Internal/ChannelParser.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/StreamChannel.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Pipe.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Compression/DecompressingWritableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Compression/DecompressingReadableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Compression/CompressingReadableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Compression/CompressingWritableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/BufferedReader.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Payload.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/WritableIterableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/ReadableStreamIteratorAggregate.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/ReadableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/ClosedException.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Base64/Base64DecodingWritableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Base64/Base64DecodingReadableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Base64/Base64EncodingReadableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/Base64/Base64EncodingWritableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/ReadableStreamChain.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/ReadableIterableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/BufferException.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/PendingReadError.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/ReadableResourceStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/ReadableBuffer.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/ResourceStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/StreamException.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/WritableResourceStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/WritableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/WritableBuffer.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/src/AsyncWriter.php +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/composer-require-check.json +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/byte-stream/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/sync/.php-cs-fixer.dist.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/PriorityQueue.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/SyncException.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/Internal/ConcurrentIteratorChannel.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/LocalMutex.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/PrefixedKeyedSemaphore.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/StaticKeySemaphore.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/Parcel.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/Barrier.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/Mutex.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/StaticKeyMutex.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/ChannelException.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/LocalSemaphore.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/KeyedMutex.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/LocalKeyedSemaphore.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/Lock.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/LocalParcel.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/PrefixedKeyedMutex.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/Semaphore.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/RateLimitingSemaphore.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/Channel.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/LocalKeyedMutex.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/SemaphoreMutex.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/ParcelException.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/SharedMemoryParcel.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/PosixSemaphore.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/src/KeyedSemaphore.php +/var/www/html/apps/gdatavaas/vendor/amphp/sync/composer-require-check.json +/var/www/html/apps/gdatavaas/vendor/amphp/sync/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/sync/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/sync/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/sync/README.md +/var/www/html/apps/gdatavaas/vendor/amphp/process/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/Posix/PosixRunner.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/Posix/PosixHandle.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/ProcessContext.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/Windows/WindowsRunner.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/Windows/WindowsHandle.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/Windows/SignalCode.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/Windows/SocketConnector.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/Windows/HandshakeStatus.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/Windows/HandshakeException.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/ProcessStatus.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/ProcHolder.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/ProcessRunner.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/ProcessStreams.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Internal/ProcessHandle.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/Process.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/ProcessException.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/src/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/process/bin/windows/ProcessWrapper64.exe +/var/www/html/apps/gdatavaas/vendor/amphp/process/bin/windows/ProcessWrapper.exe +/var/www/html/apps/gdatavaas/vendor/amphp/process/composer-require-check.json +/var/www/html/apps/gdatavaas/vendor/amphp/process/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/process/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/process/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/process/README.md +/var/www/html/apps/gdatavaas/vendor/amphp/socket/.php-cs-fixer.dist.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/ServerSocketFactory.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/UdpSocket.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/InternetAddressVersion.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/ResourceServerSocket.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/Internal/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/SocketPool.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/BindContext.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/UnlimitedSocketPool.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/StaticSocketConnector.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/RetrySocketConnector.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/ResourceSocket.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/SocketConnector.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/TlsInfo.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/SocketAddressType.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/ResourceServerSocketFactory.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/ServerTlsContext.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/DnsSocketConnector.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/PendingReceiveError.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/InternetAddress.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/CidrMatcher.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/Socks5SocketConnector.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/ConnectException.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/SocketAddress.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/Certificate.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/ClientTlsContext.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/Socket.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/SocketException.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/SocketAddress/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/UnixAddress.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/TlsException.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/ServerSocket.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/ResourceUdpSocket.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/PendingAcceptError.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/ConnectContext.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/src/TlsState.php +/var/www/html/apps/gdatavaas/vendor/amphp/socket/composer-require-check.json +/var/www/html/apps/gdatavaas/vendor/amphp/socket/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/socket/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/socket/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/socket/README.md +/var/www/html/apps/gdatavaas/vendor/amphp/opcache-blacklist.txt +/var/www/html/apps/gdatavaas/vendor/amphp/parser/.php-cs-fixer.dist.php +/var/www/html/apps/gdatavaas/vendor/amphp/parser/.editorconfig +/var/www/html/apps/gdatavaas/vendor/amphp/parser/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/parser/src/Parser.php +/var/www/html/apps/gdatavaas/vendor/amphp/parser/src/InvalidDelimiterError.php +/var/www/html/apps/gdatavaas/vendor/amphp/parser/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/parser/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/parser/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/parser/README.md +/var/www/html/apps/gdatavaas/vendor/amphp/http/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/Internal/constants.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/HttpResponse.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/Cookie/InvalidCookieException.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/Cookie/CookieAttributes.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/Cookie/ResponseCookie.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/Cookie/RequestCookie.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/InvalidHeaderException.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/HttpMessage.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/Http1/Rfc7230.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/Http2/Http2ConnectionException.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/Http2/Http2Processor.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/Http2/Http2Parser.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/Http2/Http2StreamException.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/HttpStatus.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/src/HttpRequest.php +/var/www/html/apps/gdatavaas/vendor/amphp/http/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/http/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/http/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/cache/.php-cs-fixer.dist.php +/var/www/html/apps/gdatavaas/vendor/amphp/cache/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/cache/src/StringCache.php +/var/www/html/apps/gdatavaas/vendor/amphp/cache/src/PrefixCache.php +/var/www/html/apps/gdatavaas/vendor/amphp/cache/src/SerializedCache.php +/var/www/html/apps/gdatavaas/vendor/amphp/cache/src/Cache.php +/var/www/html/apps/gdatavaas/vendor/amphp/cache/src/AtomicCache.php +/var/www/html/apps/gdatavaas/vendor/amphp/cache/src/NullCache.php +/var/www/html/apps/gdatavaas/vendor/amphp/cache/src/LocalCache.php +/var/www/html/apps/gdatavaas/vendor/amphp/cache/src/StringCacheAdapter.php +/var/www/html/apps/gdatavaas/vendor/amphp/cache/src/CacheException.php +/var/www/html/apps/gdatavaas/vendor/amphp/cache/composer-require-check.json +/var/www/html/apps/gdatavaas/vendor/amphp/cache/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/cache/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/cache/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/serialization/src/NativeSerializer.php +/var/www/html/apps/gdatavaas/vendor/amphp/serialization/src/PassthroughSerializer.php +/var/www/html/apps/gdatavaas/vendor/amphp/serialization/src/CompressingSerializer.php +/var/www/html/apps/gdatavaas/vendor/amphp/serialization/src/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/serialization/src/JsonSerializer.php +/var/www/html/apps/gdatavaas/vendor/amphp/serialization/src/SerializationException.php +/var/www/html/apps/gdatavaas/vendor/amphp/serialization/src/Serializer.php +/var/www/html/apps/gdatavaas/vendor/amphp/serialization/.php_cs.dist +/var/www/html/apps/gdatavaas/vendor/amphp/serialization/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/serialization/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/.php-cs-fixer.dist.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/src/Internal/amp-hpack.h +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/src/Internal/HPackNative.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/src/Internal/HPackNghttp2.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/src/Internal/huffman-lookup.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/src/Internal/huffman-codes.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/src/HPack.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/src/HPackException.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/examples/bench.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/tools/compress.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/tools/php-fuzzer/decode.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/tools/php-fuzzer/decode-crash.php +/var/www/html/apps/gdatavaas/vendor/amphp/hpack/tools/php-fuzzer/decode-oracle.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/.github/workflows/ci.yml +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/NetworkInterceptor.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/TimeoutException.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/DelegateHttpClient.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Internal/ResponseBodyStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Internal/HarAttributes.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Internal/FormField.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Internal/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Internal/EventInvoker.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Internal/Phase.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Internal/SizeLimitingReadableStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Form.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/BufferedContent.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/HttpException.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Trailers.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/ParseException.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/MissingAttributeError.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/InterceptedHttpClient.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Request.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/PooledHttpClient.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/functions.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/HttpClientBuilder.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/InvalidRequestException.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/EventListener/LogHttpArchive.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Response.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/HttpClient.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/HttpContent.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/SocketException.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/SetResponseHeader.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/TooManyRedirectsException.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/ResolveBaseUri.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/SetRequestHeaderIfUnset.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/AddRequestHeader.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/SetRequestTimeout.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/RemoveRequestHeader.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/ModifyRequest.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/SetResponseHeaderIfUnset.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/RetryRequests.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/SetRequestHeader.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/AddResponseHeader.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/DecompressResponse.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/RemoveResponseHeader.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/ModifyResponse.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/FollowRedirects.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/MatchOrigin.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Interceptor/ForbidUriUserInfo.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/StreamedContent.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/EventListener.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/Internal/Http2Stream.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/Internal/Http1Parser.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/Internal/Http2ConnectionProcessor.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/Internal/RequestNormalizer.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/ConnectionFactory.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/InterceptedStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/StreamLimitingPool.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/Connection.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/ConnectionLimitingPool.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/UnlimitedConnectionPool.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/UpgradedSocket.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/Http1Connection.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/DefaultConnectionFactory.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/Stream.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/HttpStream.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/ConnectionPool.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/Connection/Http2Connection.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/src/ApplicationInterceptor.php +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/CHANGELOG.md +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/composer.json +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/LICENSE +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/psalm.xml +/var/www/html/apps/gdatavaas/vendor/amphp/http-client/README.md diff --git a/opcache-disabled.ini b/opcache-disabled.ini new file mode 100644 index 00000000..25dd2bf2 --- /dev/null +++ b/opcache-disabled.ini @@ -0,0 +1,9 @@ +opcache.enable=1 +opcache.interned_strings_buffer=32 +opcache.max_accelerated_files=10000 +opcache.memory_consumption=128 +opcache.save_comments=1 +opcache.revalidate_freq=60 +opcache.jit=1255 +opcache.jit_buffer_size=128M +opcache.blacklist_filename=/usr/local/etc/php/conf.d/opcache-blacklist.txt \ No newline at end of file diff --git a/package.json b/package.json index 5173b630..86f556fc 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "license": "AGPL-3.0-or-later", "private": true, "scripts": { - "build": "webpack --node-env production --progress", + "build": "webpack --node-env production", "dev": "webpack --node-env development --progress", "watch": "webpack --node-env development --progress --watch", "serve": "webpack --node-env development serve --progress", diff --git a/tests/bats/functionality-parallel.bats b/tests/bats/functionality-parallel.bats index e81f1ac4..e99715d8 100755 --- a/tests/bats/functionality-parallel.bats +++ b/tests/bats/functionality-parallel.bats @@ -15,14 +15,45 @@ setup_file() { } @test "test admin eicar Upload" { - RESULT=$(echo $EICAR_STRING | curl --silent -w "%{http_code}" -u admin:admin -T - http://127.0.0.1/remote.php/dav/files/admin/functionality-parallel.eicar.com.txt) + EICAR_LENGTH=$(echo $EICAR_STRING | wc -c) + RESULT=$(echo $EICAR_STRING | curl -v -X PUT -d"$EICAR_STRING" -w "%{http_code}" -u admin:admin -T - http://127.0.0.1/remote.php/dav/files/admin/functionality-parallel.eicar.com.txt || echo "curl failed") + + if [[ "$RESULT" =~ "curl failed" ]]; then + $DOCKER_EXEC_WITH_USER -i nextcloud-container ls -lha data + $DOCKER_EXEC_WITH_USER -i nextcloud-container ls -lha data/admin + $DOCKER_EXEC_WITH_USER -i nextcloud-container ls -lha data/admin/files + $DOCKER_EXEC_WITH_USER -i nextcloud-container cat .htaccess + df -h + free + mpstat + docker stats --no-stream --no-trunc + $DOCKER_EXEC_WITH_USER -i nextcloud-container cat data/nextcloud.log + $DOCKER_EXEC_WITH_USER -i nextcloud-container cat /var/www/html/data/php.log + docker logs nextcloud-container + fi + echo "Actual: $RESULT" curl --silent -q -u admin:admin -X DELETE http://127.0.0.1/remote.php/dav/files/admin/functionality-parallel.eicar.com.txt || echo "file not found" [[ "$RESULT" =~ "Upload cannot be completed." ]] } @test "test admin clean upload" { - RESULT=$(echo $CLEAN_STRING | curl -w "%{http_code}" -u admin:admin -T - http://127.0.0.1/remote.php/dav/files/admin/functionality-parallel.clean.txt) + RESULT=$(echo $CLEAN_STRING | curl -w "%{http_code}" -u admin:admin -T - http://127.0.0.1/remote.php/dav/files/admin/functionality-parallel.clean.txt || echo "curl failed") + + if [[ "$RESULT" =~ "curl failed" ]]; then + $DOCKER_EXEC_WITH_USER -i nextcloud-container ls -lha data + $DOCKER_EXEC_WITH_USER -i nextcloud-container ls -lha data/admin + $DOCKER_EXEC_WITH_USER -i nextcloud-container ls -lha data/admin/files + $DOCKER_EXEC_WITH_USER -i nextcloud-container cat .htaccess + df -h + free + mpstat + docker stats --no-stream --no-trunc + $DOCKER_EXEC_WITH_USER -i nextcloud-container cat data/nextcloud.log + $DOCKER_EXEC_WITH_USER -i nextcloud-container cat /var/www/html/data/php.log + docker logs nextcloud-container + fi + echo "Actual: $RESULT" curl --silent -q -u admin:admin -X DELETE http://127.0.0.1/remote.php/dav/files/admin/functionality-parallel.clean.txt || echo "file not found" [[ $RESULT -ge 200 && $RESULT -lt 300 ]]