fix: movement export is now a POST guarded by a CSRF token#89
Open
Mincka wants to merge 1 commit into
Open
Conversation
BoursoBank changed the CSV movement export flow: the old `GET /budget/exporter-mouvements?movementSearch[...]` now 302-redirects to the HTML form page `/mon-budget/generate`, so `get_transactions` hit the "HTML => no transactions" branch and silently returned an empty list for EVERY account (reproducible on v0.5.4: `export transactions` returns 0 for an account that has 77). Fix: GET the export form, scrape `movementSearch[_token]`, then POST `/budget/exporter-mouvements` with the token and the renamed fields (`filtredBy=filtredByCategory`, `category`). A genuinely empty period still bounces to the export form (return empty); an HTML page WITHOUT the form (expired session / changed flow) now errors instead of silently reporting zero, so callers don't overwrite good data with nothing. Adds unit tests for the token extraction. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mincka
force-pushed
the
fix/movement-export-post-token
branch
from
July 23, 2026 08:52
6cb8a1b to
72cc2d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BoursoBank changed the CSV movement export flow: the old
GET /budget/exporter-mouvements?movementSearch[...]now 302-redirects to theHTML form page
/mon-budget/generate, soget_transactionshits the"HTML => no transactions" branch and silently returns an empty list for every
account.
Reproducible on v0.5.4:
bourso-cli export transactionsreturnsFound 0 transactionsfor an account that actually has 77.Fix
movementSearch[_token], then POST/budget/exporter-mouvementswith the token and the renamed fields(
filtredBy=filtredByCategory,category).HTML page without the form (expired session / changed flow) now errors
instead of silently reporting zero, so callers don't overwrite good data with
nothing.
Verified against a live account: 0 → 77 transactions;
cargo testgreen.