Skip to content

fix: support local slugs in document link provider #6376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fbricon
Copy link
Contributor

@fbricon fbricon commented Jul 1, 2025

Document link navigation is currently broken if a config file "uses" a local slug, e.g. a "./", "file://" or "http://" url, the ConfigYamlDocumentLinkProvider always prefixes the path with https://hub.continue.dev/ and then opens an invalid url.

This PR fixes it.

proper-local-slug-navigation.mp4

I'm hesitant to provide support for directory traversal (../..) it's often source of security issues, but I'm not even sure if continue supports it. You tell me.

The CLA has been sent to @sestinj.


Summary by cubic

Fixed document link navigation for config files that use local slugs like "./" or "file://", so links now resolve correctly instead of always pointing to https://hub.continue.dev/.

@fbricon fbricon requested a review from a team as a code owner July 1, 2025 14:14
@fbricon fbricon requested review from Patrick-Erichsen and removed request for a team July 1, 2025 14:14
Copy link

netlify bot commented Jul 1, 2025

👷 Deploy request for continuedev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 6c22772

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 1, 2025
Copy link

github-actions bot commented Jul 1, 2025


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs Jul 1, 2025
@github-project-automation github-project-automation bot moved this from Done to In Progress in Issues and PRs Jul 1, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 1, 2025
@Patrick-Erichsen
Copy link
Collaborator

I think we do support directory traversal, although this is probably a case where the functionality is the docs 😅 what are your thoughts on the security concerns @fbricon ?

@fbricon fbricon force-pushed the fix-local-slug-navigation branch 3 times, most recently from 79eb09a to 61ab27d Compare July 2, 2025 10:32
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jul 2, 2025
@Patrick-Erichsen
Copy link
Collaborator

Patrick-Erichsen commented Jul 2, 2025

@fbricon I'm almost positive you've signed the CLA already but it seems to still be blocking this PR, mind commenting I have read the CLA Document and I hereby sign the CLA again to see if it fixes it?

Also apologies but I think you need to merge main to fix the failing e2e test, that is a new one that seems to be breaking existing PRs

Signed-off-by: Fred Bricon <fbricon@gmail.com>
@fbricon fbricon force-pushed the fix-local-slug-navigation branch from 61ab27d to 4f9462d Compare July 2, 2025 16:07
@continuedev continuedev unlocked this conversation Jul 2, 2025
@Patrick-Erichsen
Copy link
Collaborator

Actually @fbricon you can ignore the CLA thing, #6408 will solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants