Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.1.6

### Security

- **Bump starlette** to latest to remediate CVE-2025-54121 (MEDIUM) and CVE-2025-62727 (HIGH). Removes the `starlette==0.41.2` constraint pin.
- **Bump python-multipart** to latest to remediate CVE-2026-40347 (MEDIUM).

## 0.1.5

### Security
Expand Down
2 changes: 1 addition & 1 deletion prepline_general/api/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.5" # pragma: no cover
__version__ = "0.1.6" # pragma: no cover
1 change: 1 addition & 0 deletions prepline_general/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ async def patched_get_form(
*,
max_files: int | float = 1000,
max_fields: int | float = 1000,
max_part_size: int = 1024 * 1024,
) -> FormData:
"""
Call the original get_form, and iterate the results
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ path = "prepline_general/api/__version__.py"
[tool.uv]
# Constraints for transitive dependencies that need pinning for functional reasons
constraint-dependencies = [
# later versions of Starlette break middleware
"starlette==0.41.2",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Monkey-patched _get_form missing max_part_size parameter from starlette 1.0.0

High Severity

Removing the starlette==0.41.2 constraint allows upgrade to starlette 1.0.0, but prepline_general/api/app.py monkey-patches Request._get_form with a signature that only accepts max_files and max_fields. Starlette 0.44.0 (PR #2815, Dec 2024) added max_part_size to _get_form's signature, and form() forwards it. At runtime, starlette 1.0.0's form() will call _get_form(max_files=..., max_fields=..., max_part_size=...), causing a TypeError on the patched version. This breaks all multipart form uploads — the API's core functionality.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ddaeefc. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved below

# pdfminer.six 20260107 includes performance fix
"pdfminer-six==20260107",
]

[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple"
default = true

[tool.pyright]
pythonPlatform = "Linux"
pythonVersion = "3.12"
Expand Down
Loading
Loading