mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-16 01:31:09 -06:00
Compare commits
4 Commits
v2.19.6
...
bebf095b50
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bebf095b50 | ||
|
|
533b64cb70 | ||
|
|
b3d6359afc | ||
|
|
b6e3827ab1 |
50
.github/dependabot.yml
vendored
50
.github/dependabot.yml
vendored
@@ -41,30 +41,56 @@ updates:
|
|||||||
- "backend"
|
- "backend"
|
||||||
- "dependencies"
|
- "dependencies"
|
||||||
groups:
|
groups:
|
||||||
|
# Development & CI/CD Tooling
|
||||||
development:
|
development:
|
||||||
patterns:
|
patterns:
|
||||||
- "*pytest*"
|
- "*pytest*"
|
||||||
- "ruff"
|
- "ruff"
|
||||||
- "mkdocs-material"
|
- "mkdocs-material"
|
||||||
- "pre-commit*"
|
- "pre-commit*"
|
||||||
django:
|
# Django & DRF Ecosystem
|
||||||
|
django-ecosystem:
|
||||||
patterns:
|
patterns:
|
||||||
- "*django*"
|
- "*django*"
|
||||||
- "drf-*"
|
- "drf-*"
|
||||||
major-versions:
|
- "djangorestframework"
|
||||||
|
- "whitenoise"
|
||||||
|
- "bleach"
|
||||||
|
- "jinja2"
|
||||||
|
# Async, Task Queuing & Caching
|
||||||
|
async-tasks:
|
||||||
|
patterns:
|
||||||
|
- "celery*"
|
||||||
|
- "channels*"
|
||||||
|
- "flower"
|
||||||
|
- "redis"
|
||||||
|
# Document, PDF, and OCR Processing
|
||||||
|
document-processing:
|
||||||
|
patterns:
|
||||||
|
- "ocrmypdf"
|
||||||
|
- "pdf2image"
|
||||||
|
- "pyzbar"
|
||||||
|
- "zxing-cpp"
|
||||||
|
- "tika-client"
|
||||||
|
- "gotenberg-client"
|
||||||
|
- "python-magic"
|
||||||
|
- "python-gnupg"
|
||||||
|
# Data, NLP, and Search
|
||||||
|
data-nlp-search:
|
||||||
|
patterns:
|
||||||
|
- "nltk"
|
||||||
|
- "scikit-learn"
|
||||||
|
- "langdetect"
|
||||||
|
- "rapidfuzz"
|
||||||
|
- "whoosh-reloaded"
|
||||||
|
# Utilities (Patch Updates)
|
||||||
|
utilities-patch:
|
||||||
update-types:
|
update-types:
|
||||||
- "major"
|
- "patch"
|
||||||
small-changes:
|
# Utilities (Minor Updates)
|
||||||
|
utilities-minor:
|
||||||
update-types:
|
update-types:
|
||||||
- "minor"
|
- "minor"
|
||||||
- "patch"
|
|
||||||
exclude-patterns:
|
|
||||||
- "*django*"
|
|
||||||
- "drf-*"
|
|
||||||
pre-built:
|
|
||||||
patterns:
|
|
||||||
- psycopg*
|
|
||||||
- zxing-cpp
|
|
||||||
# Enable updates for GitHub Actions
|
# Enable updates for GitHub Actions
|
||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
target-branch: "dev"
|
target-branch: "dev"
|
||||||
|
|||||||
@@ -1,5 +1,35 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## paperless-ngx 2.19.6
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Chore: include password validation on user edit [@shamoon](https://github.com/shamoon) ([#11308](https://github.com/paperless-ngx/paperless-ngx/pull/11308))
|
||||||
|
- Fix: include BASE_URL when constructing for workflows [@ebardsley](https://github.com/ebardsley) ([#11360](https://github.com/paperless-ngx/paperless-ngx/pull/11360))
|
||||||
|
- Fixhancement: refactor email attachment logic [@shamoon](https://github.com/shamoon) ([#11336](https://github.com/paperless-ngx/paperless-ngx/pull/11336))
|
||||||
|
- Fixhancement: trim whitespace for some text searches [@shamoon](https://github.com/shamoon) ([#11357](https://github.com/paperless-ngx/paperless-ngx/pull/11357))
|
||||||
|
- Fix: update Outlook refresh token when refreshed [@shamoon](https://github.com/shamoon) ([#11341](https://github.com/paperless-ngx/paperless-ngx/pull/11341))
|
||||||
|
- Fix: only cache remote version data for version checking [@shamoon](https://github.com/shamoon) ([#11320](https://github.com/paperless-ngx/paperless-ngx/pull/11320))
|
||||||
|
- Fix: include replace none logic in storage path preview, improve jinja conditionals for empty metadata [@shamoon](https://github.com/shamoon) ([#11315](https://github.com/paperless-ngx/paperless-ngx/pull/11315))
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- docker(deps): bump astral-sh/uv from 0.9.7-python3.12-bookworm-slim to 0.9.9-python3.12-bookworm-slim @[dependabot[bot]](https://github.com/apps/dependabot) ([#11338](https://github.com/paperless-ngx/paperless-ngx/pull/11338))
|
||||||
|
|
||||||
|
### All App Changes
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>7 changes</summary>
|
||||||
|
|
||||||
|
- Fix: include BASE_URL when constructing for workflows [@ebardsley](https://github.com/ebardsley) ([#11360](https://github.com/paperless-ngx/paperless-ngx/pull/11360))
|
||||||
|
- Fixhancement: refactor email attachment logic [@shamoon](https://github.com/shamoon) ([#11336](https://github.com/paperless-ngx/paperless-ngx/pull/11336))
|
||||||
|
- Fixhancement: trim whitespace for some text searches [@shamoon](https://github.com/shamoon) ([#11357](https://github.com/paperless-ngx/paperless-ngx/pull/11357))
|
||||||
|
- Fix: update Outlook refresh token when refreshed [@shamoon](https://github.com/shamoon) ([#11341](https://github.com/paperless-ngx/paperless-ngx/pull/11341))
|
||||||
|
- Fix: only cache remote version data for version checking [@shamoon](https://github.com/shamoon) ([#11320](https://github.com/paperless-ngx/paperless-ngx/pull/11320))
|
||||||
|
- Fix: include replace none logic in storage path preview, improve jinja conditionals for empty metadata [@shamoon](https://github.com/shamoon) ([#11315](https://github.com/paperless-ngx/paperless-ngx/pull/11315))
|
||||||
|
- Chore: include password validation on user edit [@shamoon](https://github.com/shamoon) ([#11308](https://github.com/paperless-ngx/paperless-ngx/pull/11308))
|
||||||
|
</details>
|
||||||
|
|
||||||
## paperless-ngx 2.19.5
|
## paperless-ngx 2.19.5
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -48,12 +48,13 @@ if settings.AUDIT_LOG_ENABLED:
|
|||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def disable_signal(sig, receiver, sender) -> Generator:
|
def disable_signal(sig, receiver, sender, *, weak: bool | None = None) -> Generator:
|
||||||
try:
|
try:
|
||||||
sig.disconnect(receiver=receiver, sender=sender)
|
sig.disconnect(receiver=receiver, sender=sender)
|
||||||
yield
|
yield
|
||||||
finally:
|
finally:
|
||||||
sig.connect(receiver=receiver, sender=sender)
|
kwargs = {"weak": weak} if weak is not None else {}
|
||||||
|
sig.connect(receiver=receiver, sender=sender, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class Command(CryptMixin, BaseCommand):
|
class Command(CryptMixin, BaseCommand):
|
||||||
@@ -258,16 +259,19 @@ class Command(CryptMixin, BaseCommand):
|
|||||||
post_save,
|
post_save,
|
||||||
receiver=update_filename_and_move_files,
|
receiver=update_filename_and_move_files,
|
||||||
sender=Document,
|
sender=Document,
|
||||||
|
weak=False,
|
||||||
),
|
),
|
||||||
disable_signal(
|
disable_signal(
|
||||||
m2m_changed,
|
m2m_changed,
|
||||||
receiver=update_filename_and_move_files,
|
receiver=update_filename_and_move_files,
|
||||||
sender=Document.tags.through,
|
sender=Document.tags.through,
|
||||||
|
weak=False,
|
||||||
),
|
),
|
||||||
disable_signal(
|
disable_signal(
|
||||||
post_save,
|
post_save,
|
||||||
receiver=update_filename_and_move_files,
|
receiver=update_filename_and_move_files,
|
||||||
sender=CustomFieldInstance,
|
sender=CustomFieldInstance,
|
||||||
|
weak=False,
|
||||||
),
|
),
|
||||||
disable_signal(
|
disable_signal(
|
||||||
post_save,
|
post_save,
|
||||||
|
|||||||
@@ -393,9 +393,9 @@ class CannotMoveFilesException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
# should be disabled in /src/documents/management/commands/document_importer.py handle
|
# should be disabled in /src/documents/management/commands/document_importer.py handle
|
||||||
@receiver(models.signals.post_save, sender=CustomFieldInstance)
|
@receiver(models.signals.post_save, sender=CustomFieldInstance, weak=False)
|
||||||
@receiver(models.signals.m2m_changed, sender=Document.tags.through)
|
@receiver(models.signals.m2m_changed, sender=Document.tags.through, weak=False)
|
||||||
@receiver(models.signals.post_save, sender=Document)
|
@receiver(models.signals.post_save, sender=Document, weak=False)
|
||||||
def update_filename_and_move_files(
|
def update_filename_and_move_files(
|
||||||
sender,
|
sender,
|
||||||
instance: Document | CustomFieldInstance,
|
instance: Document | CustomFieldInstance,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ Content-Transfer-Encoding: 7bit
|
|||||||
<p>Some Text</p>
|
<p>Some Text</p>
|
||||||
<p>
|
<p>
|
||||||
<img src="cid:part1.pNdUSz0s.D3NqVtPg@example.de" alt="Has to be rewritten to work..">
|
<img src="cid:part1.pNdUSz0s.D3NqVtPg@example.de" alt="Has to be rewritten to work..">
|
||||||
<img src="https://upload.wikimedia.org/wikipedia/en/f/f7/RickRoll.png" alt="This image should not be shown.">
|
<img src="https://docs.paperless-ngx.com/assets/logo_full_white.svg" alt="This image should not be shown.">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>and an embedded image.<br>
|
<p>and an embedded image.<br>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<p>Some Text</p>
|
<p>Some Text</p>
|
||||||
<p>
|
<p>
|
||||||
<img src="cid:part1.pNdUSz0s.D3NqVtPg@example.de" alt="Has to be rewritten to work..">
|
<img src="cid:part1.pNdUSz0s.D3NqVtPg@example.de" alt="Has to be rewritten to work..">
|
||||||
<img src="https://upload.wikimedia.org/wikipedia/en/f/f7/RickRoll.png" alt="This image should not be shown.">
|
<img src="https://docs.paperless-ngx.com/assets/logo_full_white.svg" alt="This image should not be shown.">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>and an embedded image.<br>
|
<p>and an embedded image.<br>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
@@ -54,34 +53,6 @@ class TestUrlCanary:
|
|||||||
Verify certain URLs are still available so testing is valid still
|
Verify certain URLs are still available so testing is valid still
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def _fetch_wikimedia(cls, url: str) -> httpx.Response:
|
|
||||||
"""
|
|
||||||
Wikimedia occasionally throttles automated requests (HTTP 429). Retry a few
|
|
||||||
times with a short backoff so the tests stay stable, and skip if throttling
|
|
||||||
persists.
|
|
||||||
"""
|
|
||||||
last_resp: httpx.Response | None = None
|
|
||||||
# Wikimedia rejects requests without a browser-like User-Agent header and returns 403.
|
|
||||||
headers = {
|
|
||||||
"User-Agent": (
|
|
||||||
"Mozilla/5.0 (X11; Linux x86_64) "
|
|
||||||
"AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
||||||
"Chrome/123.0.0.0 Safari/537.36"
|
|
||||||
),
|
|
||||||
}
|
|
||||||
for delay in (0, 1, 2):
|
|
||||||
resp = httpx.get(url, headers=headers, timeout=30.0)
|
|
||||||
if resp.status_code != httpx.codes.TOO_MANY_REQUESTS:
|
|
||||||
return resp
|
|
||||||
last_resp = resp
|
|
||||||
time.sleep(delay)
|
|
||||||
|
|
||||||
pytest.skip(
|
|
||||||
"Wikimedia throttled the canary request with HTTP 429; try rerunning later.",
|
|
||||||
)
|
|
||||||
return last_resp # pragma: no cover
|
|
||||||
|
|
||||||
def test_online_image_exception_on_not_available(self):
|
def test_online_image_exception_on_not_available(self):
|
||||||
"""
|
"""
|
||||||
GIVEN:
|
GIVEN:
|
||||||
@@ -96,8 +67,8 @@ class TestUrlCanary:
|
|||||||
whether this image stays online forever, so here we check if we can detect if is not
|
whether this image stays online forever, so here we check if we can detect if is not
|
||||||
available anymore.
|
available anymore.
|
||||||
"""
|
"""
|
||||||
resp = self._fetch_wikimedia(
|
resp = httpx.get(
|
||||||
"https://upload.wikimedia.org/wikipedia/en/f/f7/nonexistent.png",
|
"https://docs.paperless-ngx.com/assets/non-existent.png",
|
||||||
)
|
)
|
||||||
with pytest.raises(httpx.HTTPStatusError) as exec_info:
|
with pytest.raises(httpx.HTTPStatusError) as exec_info:
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
@@ -119,8 +90,8 @@ class TestUrlCanary:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# Now check the URL used in samples/sample.html
|
# Now check the URL used in samples/sample.html
|
||||||
resp = self._fetch_wikimedia(
|
resp = httpx.get(
|
||||||
"https://upload.wikimedia.org/wikipedia/en/f/f7/RickRoll.png",
|
"https://docs.paperless-ngx.com/assets/logo_full_white.svg",
|
||||||
)
|
)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user