GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(id): neutralize executable URL schemes in imported Markdown links by dezren39 · Pull Request #7198 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 44 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 49aad00597
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ["http", "https", "mailto"] | ||
| .iter() | ||
| .any(|allowed| scheme.eq_ignore_ascii_case(allowed)) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve the repository's native reference URL scheme
When importing Markdown containing the repository's supported reference format, this allowlist rejects id://{hash} and id://{hash}@{revision}, which Reference::to_markdown explicitly emits in pkgs/id/src/references.rs:130–145. The link conversion consequently replaces those targets with about:invalid. Since Markdown is imported through this converter (collab.rs:151) and saved from the converted document (routes.rs:2595–2599), opening and saving such a document permanently discards its reference targets. Preserve validated native reference URLs rather than treating them as executable schemes.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| let link = &doc["content"][0]["content"][0]; | ||
| assert_eq!(link["type"], "text"); | ||
| let marks = link["marks"].as_array().unwrap(); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Select the linked nodes in the new regression tests
Both new tests fail before validating the intended behavior. Here, child zero is the unmarked Click text, so accessing its marks with as_array().unwrap() panics. In the linked-image test, content[1] is the separating space rather than the linked image, so its image assertion also fails. Select the marked text and linked image explicitly, as the existing test_link does. After correcting selection, also reconcile the linked-image expectation: the implementation copies the sanitized about:invalid into linkHref, whereas the new test requires that attribute to be absent.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if !is_safe_link_url(src) { | ||
| return None; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve embedded raster images across resize and reopen
For an embedded PNG such as , the normal Markdown image arm still preserves the source and the editor displays it. Resizing commits dimensions (web/src/image-node-view.ts:225), causing the serializer to emit an HTML <img> instead of Markdown (markdown.rs:4998–5020). On reopening, this new check rejects the same image's data: source, and the HTML fallback displays literal markup instead of the image. Use image-specific source validation that permits safe embedded raster formats, so resizing an otherwise supported image does not break its save/reopen round trip.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if !is_safe_link_url(link.url) { | ||
| attrs["href"] = json!("about:invalid"); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Restore protected newlines before validating link schemes
For a safe destination containing a leading newline or a newline within its HTTPS scheme, such as [x](<https\n://example.com>), the existing protect_newline_destinations pass replaces the newline with a placeholder before conversion. This check therefore sees httpsidweb-newline-0-token: rather than https: and replaces the destination with about:invalid. restore_attr_newlines runs only after conversion (markdown.rs:167–180), when the original target has already been discarded. Validate the restored destination instead of the placeholder-bearing string so the codec's supported newline-preserving links remain intact while executable schemes are still rejected.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · picked up
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · done — closing as superseded
Why superseded. The fix for issue #5745 already merged to main through other queue work: PR #6339 (commit d492d6a, Markdown link schemes) and PR #6592 (merged 2026-11-08T14:58Z, image URLs, issue #6364). Current main carries Independent staleness evidence. PR #7198 as pushed does not compile with the web feature: its Link-arm call passes Codex findings on PR #7198 — disposition of all 4 P2s:
Local fix work done this shift before supersession was established (Codex-finding fixes + tests, markdown suite 241/241 passing locally) was never pushed and is discarded with the worktree; the branch on GitHub is untouched by this shift except labels/notes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · correction (claim lost after work completed)
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · done (duplicate claim resolved) — Agent: repo queue worker, lane code-b (repo-worker-code). Task: task 13507 (pr_shepherd, PR #7198). This lane claimed task 13507 after lane code-l had already worked it: PR #7198 was closed as superseded by lane code-l at 2026-11-08T20:53:19Z with the outcome recorded on this PR (note 6726973992). Lane code-b verified that state fresh and completed task 13507 as superseded on that evidence — no duplicate work performed. The double claim and code-l's lost completion are the known cross-lane claim-integrity defect (code#6853 pattern). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.