Title: fix(ssr): validate bq-style declarations in the pure renderer by JosunLP · Pull Request #196 · bQuery/bQuery · GitHub
Open Graph Title: fix(ssr): validate bq-style declarations in the pure renderer by JosunLP · Pull Request #196 · bQuery/bQuery
X Title: fix(ssr): validate bq-style declarations in the pure renderer by JosunLP · Pull Request #196 · bQuery/bQuery
Description: Summary Fixes #176 (Low; CSS injection — no HTML breakout). The DOM-free setStyle concatenated bq-style property names and values into the inline style attribute with no CSS-level validation. Attribute escaping prevents HTML breakout, but an untrusted style value like x;} body{display:none injected extra declarations/rules (UI-redress/clickjacking, exfiltration via background: url(...)). Fix setStyle (pure renderer) now drops any declaration whose property name is not a valid CSS identifier (--custom or kebab-case) or whose value contains injection characters (;, {, }, <). The DOM-backed renderer was already safe — it writes via CSSStyleDeclaration.setProperty, which rejects malformed values. Verification New tests across both backends: a malicious width: 'x;} body{display:none' is dropped; safe declarations (color, marginTop) pass through. The malicious case fails on the pre-fix pure renderer. SSR suites: all pass. tsc --noEmit clean. 🤖 Generated with Claude Code
Open Graph Description: Summary Fixes #176 (Low; CSS injection — no HTML breakout). The DOM-free setStyle concatenated bq-style property names and values into the inline style attribute with no CSS-level validation. Attri...
X Description: Summary Fixes #176 (Low; CSS injection — no HTML breakout). The DOM-free setStyle concatenated bq-style property names and values into the inline style attribute with no CSS-level validation. Attri...
Opengraph URL: https://github.com/bQuery/bQuery/pull/196
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f9875622-eccd-cdee-fccc-380f34c860bb |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E1C2:153317:4A56B3:69BF46:6A4E7098 |
| html-safe-nonce | 91b541a3902a0300f80e0d33768a87fa83af4c2a64334455762057bc28156135 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUMyOjE1MzMxNzo0QTU2QjM6NjlCRjQ2OjZBNEU3MDk4IiwidmlzaXRvcl9pZCI6IjU5MzU3MjMyMjIzNjg0MTU4OTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3dcb3f8cb3b3d7fcbd5878d7cae60035643334c6836c58d59bc69f34d686b982 |
| hovercard-subject-tag | pull_request:4001190067 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/bQuery/bQuery/pull/196/files |
| twitter:image | https://avatars.githubusercontent.com/u/20913954?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/20913954?s=400&v=4 |
| og:image:alt | Summary Fixes #176 (Low; CSS injection — no HTML breakout). The DOM-free setStyle concatenated bq-style property names and values into the inline style attribute with no CSS-level validation. Attri... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/bQuery/bQuery git https://github.com/bQuery/bQuery.git |
| octolytics-dimension-user_id | 256381806 |
| octolytics-dimension-user_login | bQuery |
| octolytics-dimension-repository_id | 1139284244 |
| octolytics-dimension-repository_nwo | bQuery/bQuery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1139284244 |
| octolytics-dimension-repository_network_root_nwo | bQuery/bQuery |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width