Skip to content

fix!: removed deprecated api method - #394

Closed
raven-wing wants to merge 1 commit into
Problematy:nextfrom
raven-wing:csrf_endpoint_out
Closed

fix!: removed deprecated api method#394
raven-wing wants to merge 1 commit into
Problematy:nextfrom
raven-wing:csrf_endpoint_out

Conversation

@raven-wing

@raven-wing raven-wing commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes

    • Improved CSRF protection by requiring a valid token in the page metadata.
    • Applications now fail immediately when the CSRF token is missing or empty.
  • Refactor

    • Removed the deprecated CSRF token API endpoint and related legacy handling.
    • Existing CSRF protection remains enabled without changing other API routes.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4cb802c9-b5b4-46f7-a114-8d79148d3a19

📥 Commits

Reviewing files that changed from the base of the PR and between 326005c and 1bba296.

📒 Files selected for processing (5)
  • frontend/src/utils/csrf.js
  • goodmap/api_models.py
  • goodmap/core_api.py
  • goodmap/goodmap.py
  • tests/unit_tests/test_core_api.py
💤 Files with no reviewable changes (3)
  • goodmap/api_models.py
  • goodmap/core_api.py
  • tests/unit_tests/test_core_api.py

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The frontend now retrieves CSRF tokens synchronously from a page meta tag. The backend removes the deprecated CSRF token endpoint, response model, factory parameter, application wiring, and endpoint test.

Changes

CSRF token flow

Layer / File(s) Summary
Synchronous meta-tag token retrieval
frontend/src/utils/csrf.js
getCsrfToken now returns the meta-tag token synchronously and throws when the token is missing or empty.
Deprecated endpoint and integration removal
goodmap/api_models.py, goodmap/core_api.py, goodmap/goodmap.py, tests/unit_tests/test_core_api.py
The deprecated response model and /generate-csrf-token route were removed. Application wiring and endpoint test coverage were updated accordingly.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 1bba2

The deprecated API method removal presents no actionable merge-blocking risk in the supplied evidence, so the PR is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the removal of the deprecated CSRF API method.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@raven-wing raven-wing closed this Aug 18, 2026
@raven-wing

Copy link
Copy Markdown
Collaborator Author

@raven-wing
raven-wing deleted the csrf_endpoint_out branch August 18, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant