Skip to content

feat: allow custom protocols for app href #2575

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

Merged

Conversation

frankvHoof93
Copy link
Contributor

Allow other protocols (such as ftp://, steam://, rdp://) whilst still blocking javascript.


Homarr

Thank you for your contribution. Please ensure that your pull request meets the following pull request:

  • Builds without warnings or errors (pnpm build, autofix with pnpm format:fix)
  • Pull request targets dev branch
  • Commits follow the conventional commits guideline
  • No shorthand variable names are used (eg. x, y, i or any abbrevation)

@frankvHoof93 frankvHoof93 requested a review from a team as a code owner March 11, 2025 22:16
Copy link
Contributor

deepsource-io bot commented Mar 11, 2025

Here's the code health analysis summary for commits 71516e0..089bf77. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@manuel-rw manuel-rw added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 17, 2025
@ajnart
Copy link
Contributor

ajnart commented Apr 15, 2025

We already saw that users will always find new ways to use homarrr, having this restriction to only HTTP in the first place is restrictive, we could just define proper CSP rules so that it shows "VM1705:1 Refused to run the JavaScript URL because it violates the following Content Security Policy" error.

Either way we are not responsible for anyone's use of homarr, i'd remove the validation and expect my users to be smart enough to understand that a link is meant to be used there

@manuel-rw
Copy link
Member

manuel-rw commented Apr 28, 2025

I made some research and believe that CSP should be enough to protect the user. I will update the PR...
Review with https://report-uri.com/home/generate

@manuel-rw manuel-rw force-pushed the feat/allow-other-app-protocols branch from cb62455 to 7e76590 Compare April 28, 2025 19:53
@manuel-rw manuel-rw self-assigned this Apr 28, 2025
@manuel-rw manuel-rw added enhancement New feature or request and removed help wanted Extra attention is needed good first issue Good for newcomers labels Apr 28, 2025
@manuel-rw manuel-rw changed the title feat: Update Validation for Apps feat: allow custom protocols for app href Apr 28, 2025
@manuel-rw manuel-rw force-pushed the feat/allow-other-app-protocols branch from 7e76590 to 6680098 Compare April 28, 2025 19:55
@manuel-rw manuel-rw requested a review from a team May 16, 2025 18:20
@manuel-rw manuel-rw force-pushed the feat/allow-other-app-protocols branch from 6680098 to 27aefa6 Compare May 16, 2025 18:25
@Meierschlumpf Meierschlumpf self-requested a review May 18, 2025 15:15
@manuel-rw
Copy link
Member

@Meierschlumpf can you confirm CSP didn't break your setup?

@Meierschlumpf
Copy link
Member

I haven't tried with iframes / similar as I don't really have a setup myself. But I've tried to get around our javascript restrictions and fixed the relevant things. If you want I can also try out with iframes / images

@manuel-rw manuel-rw force-pushed the feat/allow-other-app-protocols branch from 23b3a3a to 089bf77 Compare May 23, 2025 19:59
@manuel-rw
Copy link
Member

I can confirm that nothing is broken on my dashboards. I will merge

@manuel-rw manuel-rw merged commit 09af0a7 into homarr-labs:dev May 23, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants