Skip to content

fix: restrict media protocol paths#33

Merged
AboMeezO merged 1 commit into
mainfrom
fix/restrict-media-protocol-main
Jun 13, 2026
Merged

fix: restrict media protocol paths#33
AboMeezO merged 1 commit into
mainfrom
fix/restrict-media-protocol-main

Conversation

@AboMeezO

Copy link
Copy Markdown
Member

Summary

  • Remove permissive drive-root access from the custom media protocol.
  • Allow external media only from configured directories, saved project icon directories, or image paths selected through the app in the current session.

Problem

When SELFHOST_MEDIA_ALLOWED_DIRS was unset, media:// external path requests could read any readable file under the resolved drive root.

Solution

Replace the drive-root fallback with explicit allow-list sources while preserving bundled media://app/... assets and project icon previews.

Verification

  • npm run typecheck
  • npm run lint
  • npm run build:web

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@AboMeezO, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 16 minutes and 38 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0a2d6c92-1d15-4da0-b2f7-30fb9d232c06

📥 Commits

Reviewing files that changed from the base of the PR and between 90f771f and e9d366b.

📒 Files selected for processing (3)
  • electron/ipc/handlers.js
  • electron/main.js
  • electron/services/mediaAllowlist.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/restrict-media-protocol-main

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AboMeezO AboMeezO merged commit 105d227 into main Jun 13, 2026
2 checks passed
@AboMeezO AboMeezO deleted the fix/restrict-media-protocol-main branch June 13, 2026 10:42
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