Skip to content

Fixed gif-picker, added infinite loader, removed unused code#141

Closed
dkildar wants to merge 1 commit into
developfrom
140-bug-gif-pickersearch-in-editors-crashes
Closed

Fixed gif-picker, added infinite loader, removed unused code#141
dkildar wants to merge 1 commit into
developfrom
140-bug-gif-pickersearch-in-editors-crashes

Conversation

@dkildar
Copy link
Copy Markdown
Collaborator

@dkildar dkildar commented Oct 30, 2024

Fixed gif-picker, added infinite loader, removed unused code

#140

@dkildar dkildar requested a review from feruzm October 30, 2024 10:21
@dkildar dkildar self-assigned this Oct 30, 2024
@dkildar dkildar added the bug label Oct 30, 2024
@dkildar dkildar closed this Oct 30, 2024
@dkildar
Copy link
Copy Markdown
Collaborator Author

dkildar commented Oct 30, 2024

Wrong branch name

@dkildar dkildar deleted the 140-bug-gif-pickersearch-in-editors-crashes branch October 30, 2024 10:23
@dkildar dkildar restored the 140-bug-gif-pickersearch-in-editors-crashes branch October 30, 2024 10:23
@dkildar dkildar mentioned this pull request Oct 30, 2024
@feruzm feruzm deleted the 140-bug-gif-pickersearch-in-editors-crashes branch August 12, 2025 15:11
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.

1 participant