From 2495469f32608b5d0c782452647fe3f246dc20e7 Mon Sep 17 00:00:00 2001 From: Matthias Held Date: Thu, 10 Dec 2020 21:34:47 +0100 Subject: check if path is empty --- lib/Monitor.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Monitor.php b/lib/Monitor.php index b1dad47..66cb750 100644 --- a/lib/Monitor.php +++ b/lib/Monitor.php @@ -136,6 +136,11 @@ class Monitor public function analyze($paths, $mode) { $path = $paths[0]; + + if ($path === '') { + $this->logger->debug("Path is empty."); + return; + } $storage = $this->rootFolder->getUserFolder($this->userId)->get(dirname($path))->getStorage(); if ($this->userId === null || $this->nestingLevel !== 0 || /*!$this->isUploadedFile($storage, $path) ||*/ $this->isCreatingSkeletonFiles()) { @@ -216,7 +221,7 @@ class Monitor return; case self::DELETE: - $this->logger->debug("Delete", ['app' => Application::APP_ID]); + $this->logger->debug("Delete ".$path, ['app' => Application::APP_ID]); // reset PROPFIND_COUNT $this->resetProfindCount(); @@ -242,7 +247,7 @@ class Monitor return; case self::CREATE: - $this->logger->debug("Create", ['app' => Application::APP_ID]); + $this->logger->debug("Create ".$path, ['app' => Application::APP_ID]); // reset PROPFIND_COUNT $this->resetProfindCount(); -- cgit v1.2.3 From 19b8a09477173c85873ad84d24d896b9630053a2 Mon Sep 17 00:00:00 2001 From: Matthias Held Date: Thu, 10 Dec 2020 21:38:04 +0100 Subject: use spaces and add dependabot config --- .dependabot/config.yml | 7 ++ package.json | 222 ++++++++++++++++++++++++------------------------- 2 files changed, 118 insertions(+), 111 deletions(-) create mode 100644 .dependabot/config.yml diff --git a/.dependabot/config.yml b/.dependabot/config.yml new file mode 100644 index 0000000..56423d0 --- /dev/null +++ b/.dependabot/config.yml @@ -0,0 +1,7 @@ +version: 1 +update_configs: + # Keep package.json (& lockfiles) secure and up-to-date, + # batching pull requests daily + - package_manager: "javascript" + directory: "/" + update_schedule: "daily" \ No newline at end of file diff --git a/package.json b/package.json index 4f7b9b9..b8e2173 100644 --- a/package.json +++ b/package.json @@ -1,113 +1,113 @@ { - "name": "ransomware_detection", - "version": "0.1.0", - "description": "[![Build Status](https://travis-ci.com/undo-ransomware/ransomware_detection.svg?branch=master)](https://travis-ci.com/undo-ransomware/ransomware_detection)\r [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/undo-ransomware/ransomware_detection/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/undo-ransomware/ransomware_detection/?branch=master)\r [![codecov](https://codecov.io/gh/undo-ransomware/ransomware_detection/branch/master/graph/badge.svg)](https://codecov.io/gh/undo-ransomware/ransomware_detection)", - "main": "main.js", - "directories": { - "lib": "lib", - "test": "tests" - }, - "scripts": { - "dev": "cross-env NODE_ENV=development webpack --config webpack.dev.js", - "watch": "cross-env NODE_ENV=development webpack --progress --watch --config webpack.dev.js", - "build": "cross-env NODE_ENV=production webpack --progress --hide-modules --config webpack.prod.js", - "lint": "eslint --ext .js,.vue src", - "lint:fix": "eslint --ext .js,.vue src --fix", - "test": "jest", - "test:coverage": "jest --coverage" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/undo-ransomware/ransomware_detection.git" - }, - "author": "Matthias Held", - "license": "AGPL-3.0-or-later", - "bugs": { - "url": "https://github.com/undo-ransomware/ransomware_detection/issues" - }, - "homepage": "https://github.com/undo-ransomware/ransomware_detection#readme", - "engines": { - "node": ">=10.0.0" - }, - "dependencies": { - "@polymer/iron-icon": "^3.0.1", - "@polymer/iron-icons": "^3.0.1", - "@polymer/iron-pages": "^3.0.1", - "@polymer/paper-button": "^3.0.1", - "@polymer/paper-card": "^3.0.1", - "@polymer/paper-spinner": "^3.0.2", - "core-js": "^3.0.1", - "moment": "^2.24.0", - "nextcloud-axios": "^0.2.0", - "nextcloud-server": "^0.15.9", - "nextcloud-vue": "^0.11.4", - "time-elements": "^2.0.2", - "vue": "^2.6.10", - "vue-async-computed": "^3.7.0", - "vue-moment": "^4.0.0", - "vue-router": "^3.0.6", - "vuetify": "^2.3.10", - "vuetify-loader": "^1.6.0", - "vuex-router-sync": "^5.0.0" - }, - "devDependencies": { - "@babel/core": "^7.4.5", - "@babel/plugin-syntax-dynamic-import": "^7.2.0", - "@babel/plugin-transform-runtime": "^7.4.4", - "@babel/preset-env": "^7.4.5", - "@babel/runtime": "^7.4.5", - "@vue/test-utils": "^1.0.0-beta.29", - "acorn": "^6.1.1", - "babel-eslint": "^10.0.1", - "babel-jest": "^24.8.0", - "babel-loader": "^8.0.6", - "cross-env": "^5.2.0", - "css-loader": "^2.1.1", - "deepmerge": "^4.2.2", - "eslint": "^5.16.0", - "eslint-config-standard": "^12.0.0", - "eslint-friendly-formatter": "^4.0.1", - "eslint-loader": "^2.1.1", - "eslint-plugin-import": "^2.17.3", - "eslint-plugin-node": "^8.0.1", - "eslint-plugin-promise": "^4.1.1", - "eslint-plugin-standard": "^4.0.0", - "eslint-plugin-vue": "^5.2.2", - "fibers": "^5.0.0", - "file-loader": "^3.0.1", - "jest": "^24.8.0", - "jest-serializer-vue": "^2.0.2", - "node-sass": "^4.12.0", - "prettier-eslint": "^8.8.2", - "raw-loader": "^2.0.0", - "sass": "^1.26.11", - "sass-loader": "^7.3.1", - "style-loader": "^0.23.1", - "stylelint": "^8.4.0", - "stylelint-config-recommended-scss": "^3.3.0", - "stylelint-webpack-plugin": "^0.10.5", - "vue-jest": "^3.0.4", - "vue-loader": "^15.7.0", - "vue-style-loader": "^4.1.1", - "vue-template-compiler": "^2.6.10", - "webpack": "^4.32.2", - "webpack-cli": "^3.3.2", - "webpack-merge": "^4.2.1" - }, - "jest": { - "moduleFileExtensions": [ - "js", - "vue" - ], - "moduleNameMapper": { - "^@/(.*)$": "/src/$1" - }, - "transform": { - "^.+\\.js$": "/node_modules/babel-jest", - ".*\\.(vue)$": "/node_modules/vue-jest" - }, - "snapshotSerializers": [ - "/node_modules/jest-serializer-vue" - ] - } + "name": "ransomware_detection", + "version": "0.1.0", + "description": "[![Build Status](https://travis-ci.com/undo-ransomware/ransomware_detection.svg?branch=master)](https://travis-ci.com/undo-ransomware/ransomware_detection)\r [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/undo-ransomware/ransomware_detection/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/undo-ransomware/ransomware_detection/?branch=master)\r [![codecov](https://codecov.io/gh/undo-ransomware/ransomware_detection/branch/master/graph/badge.svg)](https://codecov.io/gh/undo-ransomware/ransomware_detection)", + "main": "main.js", + "directories": { + "lib": "lib", + "test": "tests" + }, + "scripts": { + "dev": "cross-env NODE_ENV=development webpack --config webpack.dev.js", + "watch": "cross-env NODE_ENV=development webpack --progress --watch --config webpack.dev.js", + "build": "cross-env NODE_ENV=production webpack --progress --hide-modules --config webpack.prod.js", + "lint": "eslint --ext .js,.vue src", + "lint:fix": "eslint --ext .js,.vue src --fix", + "test": "jest", + "test:coverage": "jest --coverage" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/undo-ransomware/ransomware_detection.git" + }, + "author": "Matthias Held", + "license": "AGPL-3.0-or-later", + "bugs": { + "url": "https://github.com/undo-ransomware/ransomware_detection/issues" + }, + "homepage": "https://github.com/undo-ransomware/ransomware_detection#readme", + "engines": { + "node": ">=10.0.0" + }, + "dependencies": { + "@polymer/iron-icon": "^3.0.1", + "@polymer/iron-icons": "^3.0.1", + "@polymer/iron-pages": "^3.0.1", + "@polymer/paper-button": "^3.0.1", + "@polymer/paper-card": "^3.0.1", + "@polymer/paper-spinner": "^3.0.2", + "core-js": "^3.0.1", + "moment": "^2.24.0", + "nextcloud-axios": "^0.2.0", + "nextcloud-server": "^0.15.9", + "nextcloud-vue": "^0.11.4", + "time-elements": "^2.0.2", + "vue": "^2.6.10", + "vue-async-computed": "^3.7.0", + "vue-moment": "^4.0.0", + "vue-router": "^3.0.6", + "vuetify": "^2.3.10", + "vuetify-loader": "^1.6.0", + "vuex-router-sync": "^5.0.0" + }, + "devDependencies": { + "@babel/core": "^7.4.5", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", + "@babel/plugin-transform-runtime": "^7.4.4", + "@babel/preset-env": "^7.4.5", + "@babel/runtime": "^7.4.5", + "@vue/test-utils": "^1.0.0-beta.29", + "acorn": "^6.1.1", + "babel-eslint": "^10.0.1", + "babel-jest": "^24.8.0", + "babel-loader": "^8.0.6", + "cross-env": "^5.2.0", + "css-loader": "^2.1.1", + "deepmerge": "^4.2.2", + "eslint": "^5.16.0", + "eslint-config-standard": "^12.0.0", + "eslint-friendly-formatter": "^4.0.1", + "eslint-loader": "^2.1.1", + "eslint-plugin-import": "^2.17.3", + "eslint-plugin-node": "^8.0.1", + "eslint-plugin-promise": "^4.1.1", + "eslint-plugin-standard": "^4.0.0", + "eslint-plugin-vue": "^5.2.2", + "fibers": "^5.0.0", + "file-loader": "^3.0.1", + "jest": "^24.8.0", + "jest-serializer-vue": "^2.0.2", + "node-sass": "^4.12.0", + "prettier-eslint": "^8.8.2", + "raw-loader": "^2.0.0", + "sass": "^1.26.11", + "sass-loader": "^7.3.1", + "style-loader": "^0.23.1", + "stylelint": "^8.4.0", + "stylelint-config-recommended-scss": "^3.3.0", + "stylelint-webpack-plugin": "^0.10.5", + "vue-jest": "^3.0.4", + "vue-loader": "^15.7.0", + "vue-style-loader": "^4.1.1", + "vue-template-compiler": "^2.6.10", + "webpack": "^4.32.2", + "webpack-cli": "^3.3.2", + "webpack-merge": "^4.2.1" + }, + "jest": { + "moduleFileExtensions": [ + "js", + "vue" + ], + "moduleNameMapper": { + "^@/(.*)$": "/src/$1" + }, + "transform": { + "^.+\\.js$": "/node_modules/babel-jest", + ".*\\.(vue)$": "/node_modules/vue-jest" + }, + "snapshotSerializers": [ + "/node_modules/jest-serializer-vue" + ] + } } -- cgit v1.2.3 From 4ac24b501566cfb6c191d4dc335e39e979743f03 Mon Sep 17 00:00:00 2001 From: Matthias Held Date: Thu, 10 Dec 2020 21:42:47 +0100 Subject: update appstore info --- appinfo/info.xml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 9ed70cd..0c40b02 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -3,8 +3,21 @@ xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> ransomware_detection Ransomware recovery - - + + 0.9.0 agpl Matthias Held -- cgit v1.2.3 From ccf754710ffc26518d40511a1316bea031137305 Mon Sep 17 00:00:00 2001 From: Matthias Held Date: Thu, 10 Dec 2020 21:42:55 +0100 Subject: bump core version to 20 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 94d7634..d9fb517 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: php env: global: - - CORE_BRANCH=stable19 + - CORE_BRANCH=stable20 - APP_NAME=ransomware_detection - KRANKERL_VERSION=0.12.3 -- cgit v1.2.3 From b8c0e381a369ec608730c829c7e1ddb9a8c4e010 Mon Sep 17 00:00:00 2001 From: Matthias Held Date: Sat, 12 Dec 2020 14:13:25 +0100 Subject: bump php version to 7.3 --- .travis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d9fb517..06e2cd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,42 +26,42 @@ jobs: - env: "CHECKSTYLE=2" include: - stage: test - php: 7.2 + php: 7.3 env: - DB=mysql script: - cd apps/$APP_NAME/ - phpunit --configuration phpunit.xml - stage: test - php: 7.2 + php: 7.3 env: - DB=pgsql script: - cd apps/$APP_NAME/ - phpunit --configuration phpunit.xml - stage: test - php: 7.2 + php: 7.3 env: - DB=mysql script: - cd apps/$APP_NAME/ - phpunit --configuration phpunit.xml - stage: test - php: 7.2 + php: 7.3 env: - DB=mysql - CHECKSTYLE=1 script: - ./occ app:check-code $APP_NAME -c private -c strong-comparison - stage: test - php: 7.2 + php: 7.3 env: - DB=mysql - CHECKSTYLE=2 script: - ./occ app:check-code $APP_NAME -c deprecation - stage: report - php: 7.2 + php: 7.3 env: - DB=sqlite script: @@ -69,7 +69,7 @@ jobs: - wget https://codecov.io/bash -O codecov.sh - bash codecov.sh - stage: release - php: 7.2 + php: 7.3 env: - DB=sqlite script: -- cgit v1.2.3