mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-18 17:34:39 -05:00
Compare commits
6 Commits
5c499630aa
...
1195538cd4
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1195538cd4 | ||
![]() |
37267f3f04 | ||
![]() |
b34538d991 | ||
![]() |
fc97bd1315 | ||
![]() |
dbf3721ec2 | ||
![]() |
59afbe09b1 |
55
.github/DISCUSSION_TEMPLATE/support.yml
vendored
Normal file
55
.github/DISCUSSION_TEMPLATE/support.yml
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
title: "[Support] "
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: What's your question or issue?
|
||||||
|
description: Provide a clear and concise description of what you're trying to do, and what's going wrong.
|
||||||
|
placeholder: |
|
||||||
|
I'm trying to...
|
||||||
|
|
||||||
|
[Include screenshots if helpful]
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: steps
|
||||||
|
attributes:
|
||||||
|
label: What have you tried?
|
||||||
|
description: Describe any steps you've already taken to troubleshoot or solve the issue.
|
||||||
|
placeholder: |
|
||||||
|
- I checked the logs and saw...
|
||||||
|
- I followed the install guide and tried...
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: Paperless-ngx version
|
||||||
|
placeholder: e.g. 1.14.0
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
id: host-os
|
||||||
|
attributes:
|
||||||
|
label: Host OS
|
||||||
|
description: Include architecture if relevant.
|
||||||
|
placeholder: e.g. Ubuntu 22.04 / Raspberry Pi arm64
|
||||||
|
- type: dropdown
|
||||||
|
id: install-method
|
||||||
|
attributes:
|
||||||
|
label: Installation method
|
||||||
|
options:
|
||||||
|
- Docker - official image
|
||||||
|
- Docker - linuxserver.io image
|
||||||
|
- Bare metal
|
||||||
|
- Other (please describe above)
|
||||||
|
- type: textarea
|
||||||
|
id: system-status
|
||||||
|
attributes:
|
||||||
|
label: System status
|
||||||
|
description: If available, copy & paste the system status output from Settings > System Status > Copy
|
||||||
|
render: json
|
||||||
|
- type: textarea
|
||||||
|
id: logs
|
||||||
|
attributes:
|
||||||
|
label: Relevant logs or output
|
||||||
|
description: If you have logs, errors that might help, paste it here.
|
||||||
|
render: bash
|
@ -6007,7 +6007,6 @@ primarily.
|
|||||||
a very good job at ocr'ing a document with the default
|
a very good job at ocr'ing a document with the default
|
||||||
language. Certain language specifics such as umlauts may not get
|
language. Certain language specifics such as umlauts may not get
|
||||||
picked up properly.
|
picked up properly.
|
||||||
- `PAPERLESS_DEBUG` defaults to `false`.
|
|
||||||
- The presence of `PAPERLESS_DBHOST` now determines whether to use
|
- The presence of `PAPERLESS_DBHOST` now determines whether to use
|
||||||
PostgreSQL or SQLite.
|
PostgreSQL or SQLite.
|
||||||
- `PAPERLESS_OCR_THREADS` is gone and replaced with
|
- `PAPERLESS_OCR_THREADS` is gone and replaced with
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
# Have a look at the docs for documentation.
|
# Have a look at the docs for documentation.
|
||||||
# https://docs.paperless-ngx.com/configuration/
|
# https://docs.paperless-ngx.com/configuration/
|
||||||
|
|
||||||
# Debug. Only enable this for development.
|
|
||||||
|
|
||||||
#PAPERLESS_DEBUG=false
|
|
||||||
|
|
||||||
# Required services
|
# Required services
|
||||||
|
|
||||||
#PAPERLESS_REDIS=redis://localhost:6379
|
#PAPERLESS_REDIS=redis://localhost:6379
|
||||||
|
@ -67,7 +67,8 @@
|
|||||||
"jest-websocket-mock": "^2.5.0",
|
"jest-websocket-mock": "^2.5.0",
|
||||||
"prettier-plugin-organize-imports": "^4.1.0",
|
"prettier-plugin-organize-imports": "^4.1.0",
|
||||||
"ts-node": "~10.9.1",
|
"ts-node": "~10.9.1",
|
||||||
"typescript": "^5.5.4"
|
"typescript": "^5.5.4",
|
||||||
|
"webpack": "^5.98.0"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
|
67
src-ui/pnpm-lock.yaml
generated
67
src-ui/pnpm-lock.yaml
generated
@ -174,6 +174,9 @@ importers:
|
|||||||
typescript:
|
typescript:
|
||||||
specifier: ^5.5.4
|
specifier: ^5.5.4
|
||||||
version: 5.5.4
|
version: 5.5.4
|
||||||
|
webpack:
|
||||||
|
specifier: ^5.98.0
|
||||||
|
version: 5.98.0(esbuild@0.25.4)
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@ -6187,7 +6190,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@ampproject/remapping': 2.3.0
|
'@ampproject/remapping': 2.3.0
|
||||||
'@angular-devkit/architect': 0.1902.14(chokidar@4.0.3)
|
'@angular-devkit/architect': 0.1902.14(chokidar@4.0.3)
|
||||||
'@angular-devkit/build-webpack': 0.1902.14(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.4)))(webpack@5.98.0(esbuild@0.25.4))
|
'@angular-devkit/build-webpack': 0.1902.14(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0))(webpack@5.98.0)
|
||||||
'@angular-devkit/core': 19.2.14(chokidar@4.0.3)
|
'@angular-devkit/core': 19.2.14(chokidar@4.0.3)
|
||||||
'@angular/build': 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/localize@19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14))(@types/node@22.15.29)(chokidar@4.0.3)(jiti@1.21.7)(less@4.2.2)(postcss@8.5.2)(terser@5.39.0)(typescript@5.5.4)(yaml@2.7.0)
|
'@angular/build': 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/localize@19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14))(@types/node@22.15.29)(chokidar@4.0.3)(jiti@1.21.7)(less@4.2.2)(postcss@8.5.2)(terser@5.39.0)(typescript@5.5.4)(yaml@2.7.0)
|
||||||
'@angular/compiler-cli': 19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4)
|
'@angular/compiler-cli': 19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4)
|
||||||
@ -6201,14 +6204,14 @@ snapshots:
|
|||||||
'@babel/preset-env': 7.26.9(@babel/core@7.26.10)
|
'@babel/preset-env': 7.26.9(@babel/core@7.26.10)
|
||||||
'@babel/runtime': 7.26.10
|
'@babel/runtime': 7.26.10
|
||||||
'@discoveryjs/json-ext': 0.6.3
|
'@discoveryjs/json-ext': 0.6.3
|
||||||
'@ngtools/webpack': 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(typescript@5.5.4)(webpack@5.98.0(esbuild@0.25.4))
|
'@ngtools/webpack': 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(typescript@5.5.4)(webpack@5.98.0)
|
||||||
'@vitejs/plugin-basic-ssl': 1.2.0(vite@6.2.7(@types/node@22.15.29)(jiti@1.21.7)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.7.0))
|
'@vitejs/plugin-basic-ssl': 1.2.0(vite@6.2.7(@types/node@22.15.29)(jiti@1.21.7)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.7.0))
|
||||||
ansi-colors: 4.1.3
|
ansi-colors: 4.1.3
|
||||||
autoprefixer: 10.4.20(postcss@8.5.2)
|
autoprefixer: 10.4.20(postcss@8.5.2)
|
||||||
babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.98.0(esbuild@0.25.4))
|
babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.98.0)
|
||||||
browserslist: 4.25.0
|
browserslist: 4.25.0
|
||||||
copy-webpack-plugin: 12.0.2(webpack@5.98.0(esbuild@0.25.4))
|
copy-webpack-plugin: 12.0.2(webpack@5.98.0)
|
||||||
css-loader: 7.1.2(webpack@5.98.0(esbuild@0.25.4))
|
css-loader: 7.1.2(webpack@5.98.0)
|
||||||
esbuild-wasm: 0.25.4
|
esbuild-wasm: 0.25.4
|
||||||
fast-glob: 3.3.3
|
fast-glob: 3.3.3
|
||||||
http-proxy-middleware: 3.0.5
|
http-proxy-middleware: 3.0.5
|
||||||
@ -6216,32 +6219,32 @@ snapshots:
|
|||||||
jsonc-parser: 3.3.1
|
jsonc-parser: 3.3.1
|
||||||
karma-source-map-support: 1.4.0
|
karma-source-map-support: 1.4.0
|
||||||
less: 4.2.2
|
less: 4.2.2
|
||||||
less-loader: 12.2.0(less@4.2.2)(webpack@5.98.0(esbuild@0.25.4))
|
less-loader: 12.2.0(less@4.2.2)(webpack@5.98.0)
|
||||||
license-webpack-plugin: 4.0.2(webpack@5.98.0(esbuild@0.25.4))
|
license-webpack-plugin: 4.0.2(webpack@5.98.0)
|
||||||
loader-utils: 3.3.1
|
loader-utils: 3.3.1
|
||||||
mini-css-extract-plugin: 2.9.2(webpack@5.98.0(esbuild@0.25.4))
|
mini-css-extract-plugin: 2.9.2(webpack@5.98.0)
|
||||||
open: 10.1.0
|
open: 10.1.0
|
||||||
ora: 5.4.1
|
ora: 5.4.1
|
||||||
picomatch: 4.0.2
|
picomatch: 4.0.2
|
||||||
piscina: 4.8.0
|
piscina: 4.8.0
|
||||||
postcss: 8.5.2
|
postcss: 8.5.2
|
||||||
postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.5.4)(webpack@5.98.0(esbuild@0.25.4))
|
postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.5.4)(webpack@5.98.0)
|
||||||
resolve-url-loader: 5.0.0
|
resolve-url-loader: 5.0.0
|
||||||
rxjs: 7.8.1
|
rxjs: 7.8.1
|
||||||
sass: 1.85.0
|
sass: 1.85.0
|
||||||
sass-loader: 16.0.5(sass@1.85.0)(webpack@5.98.0(esbuild@0.25.4))
|
sass-loader: 16.0.5(sass@1.85.0)(webpack@5.98.0)
|
||||||
semver: 7.7.1
|
semver: 7.7.1
|
||||||
source-map-loader: 5.0.0(webpack@5.98.0(esbuild@0.25.4))
|
source-map-loader: 5.0.0(webpack@5.98.0)
|
||||||
source-map-support: 0.5.21
|
source-map-support: 0.5.21
|
||||||
terser: 5.39.0
|
terser: 5.39.0
|
||||||
tree-kill: 1.2.2
|
tree-kill: 1.2.2
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
typescript: 5.5.4
|
typescript: 5.5.4
|
||||||
webpack: 5.98.0(esbuild@0.25.4)
|
webpack: 5.98.0(esbuild@0.25.4)
|
||||||
webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.4))
|
webpack-dev-middleware: 7.4.2(webpack@5.98.0)
|
||||||
webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.4))
|
webpack-dev-server: 5.2.0(webpack@5.98.0)
|
||||||
webpack-merge: 6.0.1
|
webpack-merge: 6.0.1
|
||||||
webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.4))
|
webpack-subresource-integrity: 5.1.0(webpack@5.98.0)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@angular/localize': 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)
|
'@angular/localize': 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)
|
||||||
esbuild: 0.25.4
|
esbuild: 0.25.4
|
||||||
@ -6270,12 +6273,12 @@ snapshots:
|
|||||||
- webpack-cli
|
- webpack-cli
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
'@angular-devkit/build-webpack@0.1902.14(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.4)))(webpack@5.98.0(esbuild@0.25.4))':
|
'@angular-devkit/build-webpack@0.1902.14(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0))(webpack@5.98.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@angular-devkit/architect': 0.1902.14(chokidar@4.0.3)
|
'@angular-devkit/architect': 0.1902.14(chokidar@4.0.3)
|
||||||
rxjs: 7.8.1
|
rxjs: 7.8.1
|
||||||
webpack: 5.98.0(esbuild@0.25.4)
|
webpack: 5.98.0(esbuild@0.25.4)
|
||||||
webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.4))
|
webpack-dev-server: 5.2.0(webpack@5.98.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- chokidar
|
- chokidar
|
||||||
|
|
||||||
@ -8129,7 +8132,7 @@ snapshots:
|
|||||||
rxjs: 7.8.2
|
rxjs: 7.8.2
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
|
|
||||||
'@ngtools/webpack@19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(typescript@5.5.4)(webpack@5.98.0(esbuild@0.25.4))':
|
'@ngtools/webpack@19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(typescript@5.5.4)(webpack@5.98.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@angular/compiler-cli': 19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4)
|
'@angular/compiler-cli': 19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4)
|
||||||
typescript: 5.5.4
|
typescript: 5.5.4
|
||||||
@ -8928,7 +8931,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
babel-loader@9.2.1(@babel/core@7.26.10)(webpack@5.98.0(esbuild@0.25.4)):
|
babel-loader@9.2.1(@babel/core@7.26.10)(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.26.10
|
'@babel/core': 7.26.10
|
||||||
find-cache-dir: 4.0.0
|
find-cache-dir: 4.0.0
|
||||||
@ -9263,7 +9266,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-what: 3.14.1
|
is-what: 3.14.1
|
||||||
|
|
||||||
copy-webpack-plugin@12.0.2(webpack@5.98.0(esbuild@0.25.4)):
|
copy-webpack-plugin@12.0.2(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
fast-glob: 3.3.3
|
fast-glob: 3.3.3
|
||||||
glob-parent: 6.0.2
|
glob-parent: 6.0.2
|
||||||
@ -9311,7 +9314,7 @@ snapshots:
|
|||||||
shebang-command: 2.0.0
|
shebang-command: 2.0.0
|
||||||
which: 2.0.2
|
which: 2.0.2
|
||||||
|
|
||||||
css-loader@7.1.2(webpack@5.98.0(esbuild@0.25.4)):
|
css-loader@7.1.2(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
icss-utils: 5.1.0(postcss@8.5.2)
|
icss-utils: 5.1.0(postcss@8.5.2)
|
||||||
postcss: 8.5.2
|
postcss: 8.5.2
|
||||||
@ -10768,7 +10771,7 @@ snapshots:
|
|||||||
picocolors: 1.1.1
|
picocolors: 1.1.1
|
||||||
shell-quote: 1.8.3
|
shell-quote: 1.8.3
|
||||||
|
|
||||||
less-loader@12.2.0(less@4.2.2)(webpack@5.98.0(esbuild@0.25.4)):
|
less-loader@12.2.0(less@4.2.2)(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
less: 4.2.2
|
less: 4.2.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
@ -10795,7 +10798,7 @@ snapshots:
|
|||||||
prelude-ls: 1.2.1
|
prelude-ls: 1.2.1
|
||||||
type-check: 0.4.0
|
type-check: 0.4.0
|
||||||
|
|
||||||
license-webpack-plugin@4.0.2(webpack@5.98.0(esbuild@0.25.4)):
|
license-webpack-plugin@4.0.2(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
webpack-sources: 3.3.2
|
webpack-sources: 3.3.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
@ -10963,7 +10966,7 @@ snapshots:
|
|||||||
mimic-response@3.1.0:
|
mimic-response@3.1.0:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
mini-css-extract-plugin@2.9.2(webpack@5.98.0(esbuild@0.25.4)):
|
mini-css-extract-plugin@2.9.2(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
schema-utils: 4.3.2
|
schema-utils: 4.3.2
|
||||||
tapable: 2.2.2
|
tapable: 2.2.2
|
||||||
@ -11436,7 +11439,7 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
fsevents: 2.3.2
|
fsevents: 2.3.2
|
||||||
|
|
||||||
postcss-loader@8.1.1(postcss@8.5.2)(typescript@5.5.4)(webpack@5.98.0(esbuild@0.25.4)):
|
postcss-loader@8.1.1(postcss@8.5.2)(typescript@5.5.4)(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
cosmiconfig: 9.0.0(typescript@5.5.4)
|
cosmiconfig: 9.0.0(typescript@5.5.4)
|
||||||
jiti: 1.21.7
|
jiti: 1.21.7
|
||||||
@ -11727,7 +11730,7 @@ snapshots:
|
|||||||
|
|
||||||
safer-buffer@2.1.2: {}
|
safer-buffer@2.1.2: {}
|
||||||
|
|
||||||
sass-loader@16.0.5(sass@1.85.0)(webpack@5.98.0(esbuild@0.25.4)):
|
sass-loader@16.0.5(sass@1.85.0)(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
neo-async: 2.6.2
|
neo-async: 2.6.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
@ -11930,7 +11933,7 @@ snapshots:
|
|||||||
|
|
||||||
source-map-js@1.2.1: {}
|
source-map-js@1.2.1: {}
|
||||||
|
|
||||||
source-map-loader@5.0.0(webpack@5.98.0(esbuild@0.25.4)):
|
source-map-loader@5.0.0(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
iconv-lite: 0.6.3
|
iconv-lite: 0.6.3
|
||||||
source-map-js: 1.2.1
|
source-map-js: 1.2.1
|
||||||
@ -12102,7 +12105,7 @@ snapshots:
|
|||||||
mkdirp: 3.0.1
|
mkdirp: 3.0.1
|
||||||
yallist: 5.0.0
|
yallist: 5.0.0
|
||||||
|
|
||||||
terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.4)):
|
terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@jridgewell/trace-mapping': 0.3.25
|
'@jridgewell/trace-mapping': 0.3.25
|
||||||
jest-worker: 27.5.1
|
jest-worker: 27.5.1
|
||||||
@ -12399,7 +12402,7 @@ snapshots:
|
|||||||
|
|
||||||
webidl-conversions@7.0.0: {}
|
webidl-conversions@7.0.0: {}
|
||||||
|
|
||||||
webpack-dev-middleware@7.4.2(webpack@5.98.0(esbuild@0.25.4)):
|
webpack-dev-middleware@7.4.2(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
colorette: 2.0.20
|
colorette: 2.0.20
|
||||||
memfs: 4.17.2
|
memfs: 4.17.2
|
||||||
@ -12410,7 +12413,7 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
webpack: 5.98.0(esbuild@0.25.4)
|
webpack: 5.98.0(esbuild@0.25.4)
|
||||||
|
|
||||||
webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.4)):
|
webpack-dev-server@5.2.0(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/bonjour': 3.5.13
|
'@types/bonjour': 3.5.13
|
||||||
'@types/connect-history-api-fallback': 1.5.4
|
'@types/connect-history-api-fallback': 1.5.4
|
||||||
@ -12437,7 +12440,7 @@ snapshots:
|
|||||||
serve-index: 1.9.1
|
serve-index: 1.9.1
|
||||||
sockjs: 0.3.24
|
sockjs: 0.3.24
|
||||||
spdy: 4.0.2
|
spdy: 4.0.2
|
||||||
webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.4))
|
webpack-dev-middleware: 7.4.2(webpack@5.98.0)
|
||||||
ws: 8.18.2
|
ws: 8.18.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
webpack: 5.98.0(esbuild@0.25.4)
|
webpack: 5.98.0(esbuild@0.25.4)
|
||||||
@ -12455,7 +12458,7 @@ snapshots:
|
|||||||
|
|
||||||
webpack-sources@3.3.2: {}
|
webpack-sources@3.3.2: {}
|
||||||
|
|
||||||
webpack-subresource-integrity@5.1.0(webpack@5.98.0(esbuild@0.25.4)):
|
webpack-subresource-integrity@5.1.0(webpack@5.98.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
typed-assert: 1.0.9
|
typed-assert: 1.0.9
|
||||||
webpack: 5.98.0(esbuild@0.25.4)
|
webpack: 5.98.0(esbuild@0.25.4)
|
||||||
@ -12484,7 +12487,7 @@ snapshots:
|
|||||||
neo-async: 2.6.2
|
neo-async: 2.6.2
|
||||||
schema-utils: 4.3.2
|
schema-utils: 4.3.2
|
||||||
tapable: 2.2.2
|
tapable: 2.2.2
|
||||||
terser-webpack-plugin: 5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.4))
|
terser-webpack-plugin: 5.3.14(esbuild@0.25.4)(webpack@5.98.0)
|
||||||
watchpack: 2.4.4
|
watchpack: 2.4.4
|
||||||
webpack-sources: 3.3.2
|
webpack-sources: 3.3.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
@ -125,3 +125,8 @@ class MailRuleSerializer(OwnedObjectSerializer):
|
|||||||
raise serializers.ValidationError("An action parameter is required.")
|
raise serializers.ValidationError("An action parameter is required.")
|
||||||
|
|
||||||
return attrs
|
return attrs
|
||||||
|
|
||||||
|
def validate_maximum_age(self, value):
|
||||||
|
if value > 36500: # ~100 years
|
||||||
|
raise serializers.ValidationError("Maximum mail age is unreasonably large.")
|
||||||
|
return value
|
||||||
|
@ -680,3 +680,44 @@ class TestAPIMailRules(DirectoriesMixin, APITestCase):
|
|||||||
self.assertEqual(response.data["results"][0]["name"], rule1.name)
|
self.assertEqual(response.data["results"][0]["name"], rule1.name)
|
||||||
self.assertEqual(response.data["results"][1]["name"], rule2.name)
|
self.assertEqual(response.data["results"][1]["name"], rule2.name)
|
||||||
self.assertEqual(response.data["results"][2]["name"], rule4.name)
|
self.assertEqual(response.data["results"][2]["name"], rule4.name)
|
||||||
|
|
||||||
|
def test_mailrule_maxage_validation(self):
|
||||||
|
"""
|
||||||
|
GIVEN:
|
||||||
|
- An existing mail account
|
||||||
|
WHEN:
|
||||||
|
- The user submits a mail rule with an excessively large maximum_age
|
||||||
|
THEN:
|
||||||
|
- The API should reject the request
|
||||||
|
"""
|
||||||
|
account = MailAccount.objects.create(
|
||||||
|
name="Email1",
|
||||||
|
username="username1",
|
||||||
|
password="password1",
|
||||||
|
imap_server="server.example.com",
|
||||||
|
imap_port=443,
|
||||||
|
imap_security=MailAccount.ImapSecurity.SSL,
|
||||||
|
character_set="UTF-8",
|
||||||
|
)
|
||||||
|
|
||||||
|
rule_data = {
|
||||||
|
"name": "Rule1",
|
||||||
|
"account": account.pk,
|
||||||
|
"folder": "INBOX",
|
||||||
|
"filter_from": "from@example.com",
|
||||||
|
"filter_to": "aperson@aplace.com",
|
||||||
|
"filter_subject": "subject",
|
||||||
|
"filter_body": "body",
|
||||||
|
"filter_attachment_filename_include": "file.pdf",
|
||||||
|
"maximum_age": 9000000,
|
||||||
|
"action": MailRule.MailAction.MARK_READ,
|
||||||
|
"assign_title_from": MailRule.TitleSource.FROM_SUBJECT,
|
||||||
|
"assign_correspondent_from": MailRule.CorrespondentSource.FROM_NOTHING,
|
||||||
|
"order": 0,
|
||||||
|
"attachment_type": MailRule.AttachmentProcessing.ATTACHMENTS_ONLY,
|
||||||
|
}
|
||||||
|
|
||||||
|
response = self.client.post(self.ENDPOINT, data=rule_data, format="json")
|
||||||
|
|
||||||
|
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
|
||||||
|
self.assertIn("maximum_age", response.data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user