Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[pasteboard] macOS files() treats copied web URLs as file paths

Open Beginner friendly
#512 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
flutter, swift
Domain
desktop

Research direction

Start in packages/pasteboard and read the macOS PasteboardPlugin.files() implementation, especially how it handles results from readObjects(forClasses: [NSURL.self]). Reproduce by copying a web URL and calling Pasteboard.files on macOS. Done means web URLs are omitted while file URLs are still reported.

Written by the indexing model from the issue text.

Description

In packages/pasteboard, the macOS PasteboardPlugin.files() reads NSPasteboard NSURL objects without checking isFileURL. When a user copies a web link (address bar, "Copy Link"), the URL is on the pasteboard as an NSURL, and url.path returns the URL's path portion without the host — e.g. copying https://example.com/docs/page makes Pasteboard.files return /docs/page, a file that does not exist.

Consumers can't recover the scheme on their side (the path string is all they get), so they either attach a phantom file or wrongly treat the URL as a real local file whose path coincides — e.g. copying https://example.com/etc/hosts looks exactly like the file /etc/hosts.

Reproduction: copy https://example.com/some/path in a browser, then call Pasteboard.files on macOS → returns /some/path.

Suggested fix: filter the readObjects(forClasses: [NSURL.self]) result to entries where isFileURL is true, so web URLs are simply not reported. (Found while debugging cedricziel/hermes-app#417.)

Dominant language
C
Stars
512
Forks
292
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MixinNetwork/flutter-plugins

All issues in MixinNetwork/flutter-plugins

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.