Skip to content

fix(v1.2): strip the development forum's accounts and sessions from the Flarum seed - #9131

Open
github-actions[bot] wants to merge 2 commits into
release/v1.2from
backport/9127-strip-the-development-forum-s-accounts-a-v1.2
Open

github-actions[bot] wants to merge 2 commits into
release/v1.2from
backport/9127-strip-the-development-forum-s-accounts-a-v1.2

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Automated backport of #9127 to release/v1.2.

Source: d108cc1 · automation run

Any related issues, documentation, discussions?

Backport of #9127. Originally linked #9126.

How was this PR tested?

Release-branch CI runs on this branch once the conflicts are resolved and this PR is marked ready for review.

Was this PR authored or co-authored using generative AI tooling?

No.

…rum seed (#9127)

### What changes were proposed in this PR?

`bin/forum/flarum.sql` was dumped from a development forum and still
held its member accounts, login sessions, visit logs with IP addresses,
and an API key that the dashboard's forum sign-up sent.

- `flarum.sql`: the three seeded accounts get placeholder emails
(`@example.com`) and no password, so their posts stay but nobody can
sign in as them. The sessions, the API key and the visit log are
dropped, and the posts' IP addresses are cleared.
- Sign-up without the key: the seed already allows open sign-up
(`allow_sign_up = 1`), so the key only let `FlarumService.register` skip
Flarum's CSRF check. The new `bin/extend.php` exempts the sign-up route
instead (by default Flarum exempts only login), and both install scripts
copy it into the forum.

### Any related issues, documentation, discussions?

Closes #9126. Independent of #9005, which is under discussion in #9006.

### How was this PR tested?

- `flarum.service.spec.ts` now checks that sign-up sends no
`Authorization` header. It passes, and fails against the old service.
- On Flarum 1.8.5 (the seed's version) with the cleaned seed: the seed
imports, sign-up then login works with `extend.php`, sign-up is rejected
by the CSRF check without it, and the seeded accounts cannot sign in.

### Was this PR authored or co-authored using generative AI tooling?

(backported from commit d108cc1)

Generated-by: Claude Code (claude-opus-5-5)
@github-actions

Copy link
Copy Markdown
Contributor Author

The cherry-pick conflicted and was committed with conflict markers. Resolve the conflicts on this branch, then mark this PR ready for review.

Conflicting files:

  • bin/README.md
  • frontend/src/app/dashboard/service/user/flarum/flarum.service.spec.ts

…e spec it does not have)

release/v1.2's bin/README.md has no table of the files under bin/, so the row
#9127 edits does not exist there. flarum.service.spec.ts does not exist on
release/v1.2 either, so the copy the cherry-pick added is removed. The other
five files are as in #9127.
@mengw15
mengw15 marked this pull request as ready for review October 27, 2026 22:53
@github-actions github-actions Bot added ddl-change Changes to the TexeraDB DDL frontend Changes related to the frontend GUI infra labels Oct 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan, @Yicong-Huang
    You can notify them by mentioning @aglinxinyuan, @Yicong-Huang in a comment.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.47%. Comparing base (19724ee) to head (64ddf85).
⚠️ Report is 1 commits behind head on release/v1.2.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@               Coverage Diff               @@
##             release/v1.2    #9131   +/-   ##
===============================================
  Coverage           53.47%   53.47%           
  Complexity           2569     2569           
===============================================
  Files                1078     1078           
  Lines               42359    42358    -1     
  Branches             4563     4563           
===============================================
  Hits                22651    22651           
+ Misses              18396    18395    -1     
  Partials             1312     1312           
Flag Coverage Δ *Carryforward flag
access-control-service 64.35% <ø> (ø)
agent-service 38.97% <ø> (ø) Carriedforward from 19724ee
amber 53.49% <ø> (ø) Carriedforward from 19724ee
computing-unit-managing-service 1.65% <ø> (ø)
config-service 56.06% <ø> (ø)
file-service 61.72% <ø> (ø)
frontend 47.31% <ø> (+<0.01%) ⬆️ Carriedforward from 19724ee
pyamber 93.37% <ø> (ø) Carriedforward from 19724ee
python 90.93% <ø> (ø) Carriedforward from 19724ee
workflow-compiling-service 58.69% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ddl-change Changes to the TexeraDB DDL frontend Changes related to the frontend GUI infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants