Title: sqlite: track registered user-defined functions · Issue #65880 · nodejs/node · GitHub
Open Graph Title: sqlite: track registered user-defined functions · Issue #65880 · nodejs/node
X Title: sqlite: track registered user-defined functions · Issue #65880 · nodejs/node
Description: What is the problem this feature will solve? SQLite can invoke JavaScript through registered SQL functions during operations such as database.applyChangeset(), even when no filter or onConflict callback is supplied. For example, applying...
Open Graph Description: What is the problem this feature will solve? SQLite can invoke JavaScript through registered SQL functions during operations such as database.applyChangeset(), even when no filter or onConflict cal...
X Description: What is the problem this feature will solve? SQLite can invoke JavaScript through registered SQL functions during operations such as database.applyChangeset(), even when no filter or onConflict cal...
Opengraph URL: https://github.com/nodejs/node/issues/65880
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sqlite: track registered user-defined functions","articleBody":"### What is the problem this feature will solve?\n\nSQLite can invoke JavaScript through registered SQL functions during operations such as `database.applyChangeset()`, even when no `filter` or `onConflict` callback is supplied. For example, applying a row can evaluate a `CHECK` constraint that calls a JavaScript function.\n\nThis makes it unsafe to infer that an operation cannot execute JavaScript solely from the absence of explicit callbacks.\n\nPR #65870 addresses changeset buffer safety by copying non-empty changesets before applying them. Tracking registered functions would support follow-up work on callback safety and potential optimizations.\n\n### What is the feature you are proposing to solve the problem?\n\nAdd internal tracking of JavaScript-backed SQL functions registered on each `DatabaseSync` instance, including scalar and aggregate/window functions.\n\nThe tracking should remain accurate when functions are replaced and when the database is closed or reopened.\n\nUse this information to inform operation-specific safety checks. Any optimization that skips defensive copying must also account for other paths that can invoke JavaScript.\n\nPreventing function execution should be considered separately, with explicit compatibility review: existing schemas may depend on these functions in constraints, triggers, or expressions.\n\nRefs: https://github.com/nodejs/node/pull/65870#issuecomment-5571659917\n\n### What alternatives have you considered?\n\nContinue applying operation-specific protections without tracking registered functions. For changeset application, unconditional copying preserves existing function behavior while protecting the input buffer.","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-09-07T15:19:52Z","url":"https://github.com/nodejs/node/issues/65880"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dce34ffe-7e0c-09d3-e193-754fa41aa4c0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E05A:1F05C8:418F17:552815:6AED21C5 |
| html-safe-nonce | ddce324f20427841790183f81a7e7006cf4e5d0fc27b480a70a2facbfbdfa606 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDVBOjFGMDVDODo0MThGMTc6NTUyODE1OjZBRUQyMUM1IiwidmlzaXRvcl9pZCI6IjQwNjIwODIwMTE5NTIzOTA1OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 766e77d96d5230df39c3655b95cda82f8e2d476dff89f8e3c0ba8815b6d76a3f |
| hovercard-subject-tag | issue:5376485094 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/65880/issue_layout |
| twitter:image | https://opengraph.githubassets.com/254383358bc91ac1bc8b685d7df8c2f443d2078bf5a2516a0d1d03f8a0f2dc05/nodejs/node/issues/65880 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/254383358bc91ac1bc8b685d7df8c2f443d2078bf5a2516a0d1d03f8a0f2dc05/nodejs/node/issues/65880 |
| og:image:alt | What is the problem this feature will solve? SQLite can invoke JavaScript through registered SQL functions during operations such as database.applyChangeset(), even when no filter or onConflict cal... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trivikr |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width