fix(security): guest portal keys full object names (web-to-lead/case)#399
Merged
Conversation
…case)
The Web-to-Lead / Web-to-Case guest profile granted INSERT on `lead`/`case`, but
the anonymous public-form permission path checks the FULL object name
(`crm_lead`/`crm_case`) — so the short-name grant never matched and the anonymous
insert was denied ("not permitted for roles []"). Use full names.
(The short-name keys other profiles use resolve only on the authenticated path;
the explicit-permission-set path used for anonymous submissions does not namespace
short→full — tracked upstream in objectstack/framework#1989.)
Verified end-to-end: anonymous POST /api/v1/forms/contact-us/submit creates a
crm_lead; /forms/support creates a crm_case; guests still get 401 on reads.
NOTE: requires the framework fix objectstack/framework#1989 (public-form
resolution from flattened view metadata) to be released — until HotCRM bumps to
that release, the form still resolves as FORM_NOT_FOUND on published @9.8.0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
os-zhuang
added a commit
that referenced
this pull request
Jun 17, 2026
All five RBAC profiles keyed their object grants by short names (`lead`, `account`, `case`, …) — but the declared objects are `crm_lead`, `crm_account`, `crm_case`, … The short names reference NO existing object, so the grants relied on the authenticated path's namespace resolution and silently applied to nothing on the anonymous / explicit-permission-set path (the same trap that blocked web-to-lead until #399). Convert all profile object keys to the full `crm_*` names. Framework objectstack/framework#1997 now makes this a hard build error (`validateCrossReferences` rejects grants on undefined objects), so this also keeps HotCRM green once it bumps to a release containing that check. verify green: validation ✓, typecheck ✓, build ✓, tests 17/17. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
xuyushun441-sys
pushed a commit
that referenced
this pull request
Jun 20, 2026
Promotes the in-tree 9.9.1 work to the latest 9.11 line. Bumps all @objectstack/* to ^9.11.0 (manifest specVersion ^9.11.0, app 1.2.0). Full pipeline green (validate + typecheck + build + 17 tests) and the seed loads clean at boot with no runtime errors. - Lifecycle freeze hooks (opportunity_lifecycle, quote_workflow) now exempt framework-managed columns (owner_id, updated_at, created_by, …) from the "closed record" field-freeze. 9.x re-stamps ownership/timestamps via beforeUpdate (post-seed ownership assignment), which the old guard rejected with `Attempted: owner_id, updated_at` on every closed/accepted record. Business-field edits on closed records stay blocked (verified: amount write on a closed-won opp → 400, next_step → 200). - smoke.test.ts flow-count assertion relaxed to >= 16 (a pre-existing drift: the task reminder/recurrence flows pushed the total to 17 without updating the literal). Keeps green as flows are added. Note: the namespace-prefixed profiles, removed field display-props, dropped monthsBetween() validation, and case seed resolution/escalation_reason were already landed on main (#399/#400, 9.8 upgrade, 88e9b91); this change is the 9.11 delta on top. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
xuyushun441-sys
added a commit
that referenced
this pull request
Jun 20, 2026
* chore(deps): upgrade ObjectStack 9.9.1 → 9.11 (1.2.0) Promotes the in-tree 9.9.1 work to the latest 9.11 line. Bumps all @objectstack/* to ^9.11.0 (manifest specVersion ^9.11.0, app 1.2.0). Full pipeline green (validate + typecheck + build + 17 tests) and the seed loads clean at boot with no runtime errors. - Lifecycle freeze hooks (opportunity_lifecycle, quote_workflow) now exempt framework-managed columns (owner_id, updated_at, created_by, …) from the "closed record" field-freeze. 9.x re-stamps ownership/timestamps via beforeUpdate (post-seed ownership assignment), which the old guard rejected with `Attempted: owner_id, updated_at` on every closed/accepted record. Business-field edits on closed records stay blocked (verified: amount write on a closed-won opp → 400, next_step → 200). - smoke.test.ts flow-count assertion relaxed to >= 16 (a pre-existing drift: the task reminder/recurrence flows pushed the total to 17 without updating the literal). Keeps green as flows are added. Note: the namespace-prefixed profiles, removed field display-props, dropped monthsBetween() validation, and case seed resolution/escalation_reason were already landed on main (#399/#400, 9.8 upgrade, 88e9b91); this change is the 9.11 delta on top. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * ci: raise Node floor to 22 for ObjectStack 9.11 (kysely@0.29) driver-sql 9.11 pulls in kysely@0.29, which declares engines.node >=22. With engine-strict=true, `pnpm install --frozen-lockfile` fails on the Node 20 CI matrix. Bumps ci.yml, code-quality.yml, release.yml, .nvmrc, and package.json engines.node to 22 (the publish workflows already used 22). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * ci(link-check): ignore release-tag links; add 1.2.0 changelog footer CHANGELOG version footers point at /releases/tag/vX, which 404 until each release is published (v1.0.0 was never cut) — they shouldn't gate CI. Adds `releases` to the markdown-link-check ignore pattern and the [1.2.0] footer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Web-to-Lead/Case guest profile granted INSERT on
lead/case, but the anonymous public-form permission path checks the fullcrm_lead/crm_case— so the insert was denied. Use full names.Verified end-to-end: anonymous
POST /api/v1/forms/contact-us/submit→ creates acrm_lead;/forms/support→crm_case; guests still 401 on reads (INSERT-only enforced).🤖 Generated with Claude Code