Jialong(Bruce) Li
Jialong(Bruce) Li
Withdrawing this — @himanshu-commits is right that there's nowhere to send the fix. `SitemapLoader` lives in `langchain-ai/langchain-community`, which is archived and read-only, and this repo only carries the re-export shim....
Fixed the MIME-type-confusion issue flagged in the review: `upload_media` was deriving the stored file extension from the client-supplied filename rather than the validated content type, so a file with a...
Fixed the failing `check API types` check: `openapi.json` was stale after the new `GET /api/store/media/{user_id}/{media_type}/{filename}` route. Regenerated it with `poetry run export-api-schema` + `pnpm prettier --write` per the check's own...
Addressed the CodeRabbit nitpick on the local media route: `media_type` is now typed `Literal["images", "videos"]` (invalid values get a framework-level 422 instead of the manual check) and the 404 "not...
Addressed the CodeRabbit nitpick: `test_get_local_submission_media_missing_file_returns_404` used a fixed filename (`does-not-exist.png`) under the real local media directory, so a leftover file from a previous run could make it return 200 instead...
Addressed the failing CodeQL check: `get_local_media_path`/`_local_media_url` in `media.py` built the on-disk path from `sanitize_filename()`-substituted `user_id`/`filename`, which static path-injection analysis doesn't trust as a barrier (6 high-severity "uncontrolled data used in...
Addressed the still-failing CodeQL check: after the previous allow-list fix, CodeQL raised 6 new high-severity `py/path-injection` alerts on the same lines, meaning pathlib's `resolve()`/`is_relative_to()` containment check in `get_local_media_path` isn't recognized...
Addressed the still-failing CodeQL check (5 new high-severity `py/path-injection` alerts on `b95cea7c`, the previous realpath+startswith commit): read the actual query source (`PathInjectionQuery.qll`/`PathInjectionCustomizations.qll` in github/codeql) rather than guessing again — `os.path.realpath`...
Confirming CodeQL clears on `d21870a6`: the `CodeQL` check now reports "No new alerts in code changed by this pull request" (0 annotations on the Analyze (python) job), and the previously-flagged...
Fixed the blocker from the latest review: `_local_media_url` returned a root-relative `/api/store/media/...` URL, which the frontend resolved against its own origin (`:3000`) instead of the backend (`:8006`), 404ing on locally-stored...