Skip to content

Feature/sentry#21

Merged
feruzm merged 2 commits into
developfrom
feature/sentry
Sep 21, 2024
Merged

Feature/sentry#21
feruzm merged 2 commits into
developfrom
feature/sentry

Conversation

@dkildar
Copy link
Copy Markdown
Collaborator

@dkildar dkildar commented Sep 20, 2024

Please don't forget about ENV variable for sentry and use own dsn in configs

@dkildar dkildar requested a review from feruzm September 20, 2024 17:22
@dkildar dkildar self-assigned this Sep 20, 2024
@feruzm feruzm merged commit adc9723 into develop Sep 21, 2024
@feruzm feruzm deleted the feature/sentry branch September 21, 2024 12:07
feruzm added a commit that referenced this pull request May 20, 2026
Round 2 of fixes responding to automated PR review feedback.

CodeQL (new alerts triggered by round 1):
- get-pure-post-text + publish-validate-post + blog-post-page: after
  loop tag strip, also strip residual `<`/`>` so unclosed/truncated
  tags (e.g. ending `…<script` with no closing `>`) can't leave a
  `<script` or `<!--` substring in the output. Closes #141, #142.
- api/import noscript path: replaced wrapper.innerHTML + regex
  strip with DOMParser.parseFromString (no script execution) +
  whitelisted-attribute migration of <img> elements only. Eliminates
  the innerHTML sink entirely and removes the need for the regex
  event-handler strip (which greptile flagged for missing
  /onerror-style slash-separated attributes). Closes #139, #140.

Codex P2 + coderabbit #4: SAFE_IMG_SRC_RE accepted protocol-relative
and root-relative URLs but rejected document-relative ones, and
sanitize-html downstream only keeps http(s)://. Replaced with
normalizeImgSrc(candidate, document.baseURI) that resolves every form
(absolute, //protocol, /root, ./doc, plain.jpg) against the article's
base URL and requires the absolute result be http(s). Recovered lazy
images now survive the render-helper pass.

Greptile #2: a.method href check inverted from blocklist
(javascript:/data:/vbscript:/file:) to positive whitelist
(https?/mailto/hive/tel/web+ext + relative forms). Less-common
schemes (ms-its:, mk:, res:, intent:, etc.) now also rejected.
Control-char strip widened to \f \v \0 in addition to \t \n \r.

CodeRabbit:
- twitter-extension + twitterEnhancer: also accept www.twitter.com
  and www.x.com (commonly shared with the www prefix).
- profile-wallet-token-actions, profile-wallet-token-summary (×2),
  hive-engine-token-history: replaced (username as string) force-cast
  with typeof guard so an undefined param returns "" instead of
  throwing.
- promote-post-setup: `.replace("@", "")` → `.replace(/@/g, "")` for
  consistency with the adjacent /%40/g.

Skipped:
- coderabbit autofix bot — not used.
- video-upload-threespeak #21 (URL.createObjectURL blob) — same false
  positive call as before, dismiss in CodeQL UI.

Tests: render-helper 1,072/1,072 green (covers the new a.method
whitelist via 112 a.method.spec tests). Typecheck shows no new
errors on touched files; the pre-existing TS errors in
promote-post-setup, publish-validate-post and token-picker are
unrelated and were present before this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants