-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Comparing changes
Open a pull request
base repository: simstudioai/sim
base: 6a5eebc
head repository: simstudioai/sim
compare: 4efe999
- 13 commits
- 89 files changed
- 4 contributors
Commits on May 14, 2026
-
improvement(db): add session statement/lock timeouts; simplify KB doc…
… tx (#4593) * v0.6.29: login improvements, posthog telemetry (#4026) * feat(posthog): Add tracking on mothership abort (#4023) Co-authored-by: Theodore Li <theo@sim.ai> * fix(login): fix captcha headers for manual login (#4025) * fix(signup): fix turnstile key loading * fix(login): fix captcha header passing * Catch user already exists, remove login form captcha * improvement(db): add session statement/lock timeouts; simplify KB doc tx * fix(knowledge): close soft-delete TOCTOU on KB document insert Fix the race the bots flagged: KB delete is soft (`deletedAt = now`) so the FK can't catch a concurrent KB delete between the existence check and the document insert. - Add `insertDocumentsIfKbAlive` helper that gates the insert on `EXISTS(SELECT 1 FROM knowledge_base WHERE id=$kb AND deleted_at IS NULL)` in the same statement via INSERT...SELECT...WHERE EXISTS. Atomic at the MVCC snapshot — no transaction, no row lock. - Use jsonb_to_recordset to declare column types once, avoiding per-param casts for nullable columns. - Wire into both `createDocumentRecords` (bulk) and `createSingleDocument`. - Keep the upfront KB existence check as a fast-path early-out for the common case; the atomic insert is the race guard. --------- Co-authored-by: Waleed <walif6@gmail.com> Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com> Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4295a5c - Browse repository at this point
Copy the full SHA 4295a5cView commit details -
fix(seo): use canonical SITE_URL for robots and sitemap (#4598)
* fix(seo): use canonical SITE_URL for robots and sitemap * fix(seo): drop /templates from sitemap and guard robots/sitemap in seo test
Configuration menu - View commit details
-
Copy full SHA for 8831def - Browse repository at this point
Copy the full SHA 8831defView commit details -
Configuration menu - View commit details
-
Copy full SHA for b1a87d5 - Browse repository at this point
Copy the full SHA b1a87d5View commit details -
improvement(scheduler): drain due schedules in chunks (#4578)
* improvement(scheduler): drain in chunks instead of a single capped claim Replaces the fixed MAX_CRON_CLAIMS (200) with a chunked drain loop: claim WORKFLOW_CHUNK_SIZE + JOB_CHUNK_SIZE per iteration, process via Promise.allSettled, repeat until both claim queries return empty or MAX_TICK_DURATION_MS elapses. Throughput is no longer bounded by a static per-tick ceiling; it scales until DB or trigger.dev is the limit. Per-iteration chunk size still bounds row-lock set and fan-out concurrency. Extracts processScheduleItem and processJobItem so the loop body stays readable. Existing claim semantics (FOR UPDATE SKIP LOCKED, lastQueuedAt as the claim signal, staleness reclaim) are unchanged. * improvement(scheduler): skip claim once a queue is exhausted and drop workflowUtils non-null assertion Addresses Greptile review on PR #4578: - track per-queue exhaustion when a claim returns fewer than CHUNK_SIZE rows; subsequent iterations skip the claim query for that queue. Saves one DB round-trip per iteration once one queue drains while the other is still working. - narrow workflowUtils to a local const inside the loop body so the schedule processing branch only runs when the import has completed. Removes the misleading non-null assertion.
Configuration menu - View commit details
-
Copy full SHA for 642231f - Browse repository at this point
Copy the full SHA 642231fView commit details -
fix(integrations): gdrive trashed search, slack blocks-with-file, sla…
…ck get_message ts (#4600) * fix(integrations): gdrive trashed search, slack blocks-with-file, slack get_message ts - Google Drive search/list: skip default `trashed = false` when user query already specifies a `trashed = ...` predicate, so trashed-file searches work. - Slack send-message with files: forward `blocks` through to `files.completeUploadExternal` so Block Kit renders when files are attached. - Slack get_message: switch from `conversations.history` (oldest lower-bound returned the next message after) to `conversations.replies` with `ts=` for exact-match lookup, plus a defensive ts-equality guard and clearer error. * fix(google_drive): revert list.ts trashed guard — query is plain text, not gdrive syntax * fix(slack): omit initial_comment when blocks present so Block Kit actually renders on file uploads
Configuration menu - View commit details
-
Copy full SHA for 044e034 - Browse repository at this point
Copy the full SHA 044e034View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a9e248 - Browse repository at this point
Copy the full SHA 4a9e248View commit details -
fix(security): harden file access controls, webhook auth, and input b…
…ounds (#4601) * fix(security): harden file access controls, webhook auth, and input bounds * fix(security): extend file access checks to remaining tool routes * fix(logs): address PR review comments on time filter * fix(logs): set end-time milliseconds to 999 for datetime filter strings * fix(files): return 404 instead of 500 on file access denial in utility paths * remove tooltip from resource tabs
Configuration menu - View commit details
-
Copy full SHA for 80c9a01 - Browse repository at this point
Copy the full SHA 80c9a01View commit details -
chore(deps): bump next to 16.2.5 for CVE-2026-44578 SSRF fix (#4606)
* chore(deps): bump next to 16.2.5 for CVE-2026-44578 SSRF fix * chore(deps): bump next to 16.2.6 for full May 2026 security release coverage
Configuration menu - View commit details
-
Copy full SHA for 11fa96c - Browse repository at this point
Copy the full SHA 11fa96cView commit details
Commits on May 15, 2026
-
fix(security): supabase rpc path validation, ssh stream byte cap, sto…
…rage quota coverage (#4605) * fix(security): supabase rpc path validation, ssh stream byte cap, storage quota coverage * fix(security): scope execution log writes to owning workflow; add env-var workspace membership guard Closes two cross-tenant vulnerabilities: 1. Workflow log cross-tenant write (route.ts + logging-session.ts): - Route: SELECT before creating LoggingSession to verify executionId belongs to the claimed workflowId; reject with 404 if owned by a different workflow. - LoggingSession: add workflow_id to all UPDATE/SELECT WHERE clauses (raw SQL marker queries, flushAccumulatedCost, loadExistingCost) so writes are a no-op if executionId was somehow injected. 2. Env-var workspace membership guard (environment/utils.ts): - getPersonalAndWorkspaceEnv now calls checkWorkspaceAccess when workspaceId is provided; throws if the userId is not a member, preventing any future caller from reading another workspace's decrypted secrets without explicit membership verification at the call site. * fix(security): remove fileSize > 0 quota bypass gate; exempt logs context from quota * chore: remove extraneous inline comments * fix(security): scope markExecutionAsFailed UPDATE by workflowId; thread workflowId through HITL callers * fix(security): add personal credential ownership check in sharepoint site route; scope markExecutionAsFailed by workflowId * fix: remove logs from user-accessible upload contexts; restore distinct biome .next glob * fix(sharepoint): migrate site route to authorizeCredentialUse The previous fix only checked userId equality for personal credentials and workspace membership (via getUserEntityPermissions) for workspace credentials. authorizeCredentialUse additionally enforces credentialMember access for workspace-scoped credentials, matching the standard pattern used by all other tool selector routes. * fix(logging): make workflowId required in markExecutionAsFailed Making workflowId optional left a footgun — future callers could silently omit it and the WHERE clause would degrade to executionId-only, losing the cross-tenant scoping guarantee. All callers already supply workflowId, so making it required (with string | undefined for the middle params to keep call sites unchanged) closes the gap without touching any caller. * test(security): add tests for cross-tenant log guard, quota bypass fix, and workflowId scoping - log/route.test.ts: verifies cross-tenant executionId guard returns 404 when the execution belongs to a different workflow, and passes for same workflow or fresh executions - multipart/route.test.ts: verifies fileSize:0 no longer bypasses quota check and that the logs context is rejected at the endpoint level - logging-session.test.ts: verifies markExecutionAsFailed scopes by both executionId and workflowId, and that the instance method forwards workflowId * fix(lint): move IconComponent outside ToolInput to fix noNestedComponentDefinitions * fix(logging): scope completeWithCancellation and completeWithPause reads by workflowId Both SELECT queries that check execution status before writing a terminal result were only filtering on executionId. Adds workflowId to the WHERE clause so all seven reads and writes in LoggingSession consistently scope by (workflowId, executionId).
Configuration menu - View commit details
-
Copy full SHA for d0519c1 - Browse repository at this point
Copy the full SHA d0519c1View commit details -
fix(date-picker): eliminate infinite re-render crash on re-open with …
…existing selection (#4609) * docs(uploads): clarify QUOTA_EXEMPT_STORAGE_CONTEXTS logs entry in JSDoc * fix(date-picker): eliminate infinite re-render on re-open with existing selection The useEffect that syncs picker state on open had initialStart and initialEnd — Date objects computed on every render — in its dependency array. Because Object.is returns false for any two distinct Date instances, the effect fired on every render when open=true, calling setRangeStart/setRangeEnd and triggering another render, producing an infinite loop that crashed the page. Fix: compute start and end as local variables inside the effect and use the stable string props (props.startDate, props.endDate) as deps instead. Also removes the redundant typeof fileSize === 'number' guard in the multipart quota check — fileSize is z.number() (required) in the contract so it can never be undefined at that point. * refactor(date-picker): comprehensive cleanup and reliable crash fix The previous fix still had derived Date objects in useEffect deps. Object.is(new Date(), new Date()) === false, so any Date in deps causes the effect to run every render, reproducing the infinite loop on re-open with existing time selection. Key changes: - useEffect deps now use only stable primitives (startDate, endDate strings) and compute Date values inside the effect — eliminating the loop - Replace `rest as any` with a FlatDatePickerProps merged type for safe, typed destructuring across the discriminated union - Remove initialStart/initialEnd render-scope variables; compute inline or inside effects to keep derivation local to each use site - Callbacks use destructured props (onChange, onRangeChange, etc.) instead of props.x references - Remove verbose TSDoc on internal callbacks — names are self-documenting - Preserve all existing JSX structure and CalendarMonth logic unchanged
Configuration menu - View commit details
-
Copy full SHA for 922de38 - Browse repository at this point
Copy the full SHA 922de38View commit details -
fix(gmail): send emails as multipart/alternative so they render full-…
…width (#4611) * fix(gmail): send emails as multipart/alternative so they render full-width * fix(gmail): decode & last in htmlToPlainText to avoid double-decoding compound entities * fix(gmail): encode body parts as base64 and decode numeric HTML entities
Configuration menu - View commit details
-
Copy full SHA for e23c20e - Browse repository at this point
Copy the full SHA e23c20eView commit details -
improvement(gmail): replace custom html-to-text regex with library (#…
…4613) * improvement(gmail): replace custom html-to-text regex with html-to-text library Resolves 4 CodeQL alerts on htmlToPlainText (incomplete tag/entity handling, unsafe regex backtracking). Delegates to the html-to-text npm package already used by the outlook polling trigger and the mail/send route. * improvement(gmail): match outlook selectors config, add nbsp/anchor tests Aligns html-to-text options with apps/sim/lib/webhooks/polling/outlook.ts: suppress anchor hrefs when identical to text, drop bare # anchors, skip img/script/style content. Adds tests for nbsp preservation and anchor behavior.
Configuration menu - View commit details
-
Copy full SHA for 62636c7 - Browse repository at this point
Copy the full SHA 62636c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4efe999 - Browse repository at this point
Copy the full SHA 4efe999View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 6a5eebc...4efe999