mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-14 14:17:40 +00:00
fix(bitrix24): resolve PR 8-10 stack findings
Resolve the PR #8/#9/#10 stack on current dev, including Bitrix24 install callback hardening, migration renumbering, duplicate-domain fail-closed routing, UI textarea/mobile cleanup, and review hardening.
This commit is contained in:
1 parent
faa195156e
commit
ef829c1ab4
123 files changed
+19643
-100
No files matched your search
@@ -1667,6 +1667,29 @@ CREATE TABLE IF NOT EXISTS tenant_hook_budget (
|
||||
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))
|
||||
);
|
||||
|
||||
-- ============================================================
|
||||
-- Table: bitrix_portals (migration 000068)
|
||||
-- Stores per-tenant OAuth credentials + refresh state for a Bitrix24 portal.
|
||||
-- credentials + state are AES-256-GCM ciphertext (internal/crypto/aes.go).
|
||||
-- ============================================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS bitrix_portals (
|
||||
id TEXT NOT NULL PRIMARY KEY,
|
||||
tenant_id TEXT NOT NULL REFERENCES tenants(id) ON DELETE CASCADE,
|
||||
name VARCHAR(100) NOT NULL,
|
||||
domain VARCHAR(255) NOT NULL,
|
||||
credentials BLOB,
|
||||
state BLOB,
|
||||
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_bitrix_portals_tenant_name
|
||||
ON bitrix_portals (tenant_id, name);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_bitrix_portals_domain
|
||||
ON bitrix_portals (LOWER(TRIM(domain)));
|
||||
|
||||
-- ============================================================
|
||||
-- Table: webhooks (registry, migrations 000059 + 000061)
|
||||
-- secret_hash stores SHA-256 hex; used only for bearer-token lookup.
|
||||
|
||||
Reference in new issue
Block a user