fsspec / fsspec/filesystem_spec

Unquote Username and Password

Open Beginner friendly
#1,871 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.4k
Forks
490
Avg merge
2d 3h
Merged PRs (30d)
38

Description

Apologies for brevity, I’m on my cell.

I have a bunch or URLs that contain usernames and passwords. All “special” characters have been URL Encoded (“quoted”, to use urllib’s term). But when using url_to_fs, any URL’s with encoded characters fail.

I think there’s a simple fix. If you wrap these two in urllib’s “unquote”.

https://github.com/fsspec/filesystem_spec/blob/8463a6a587f722f279e987b3e8508f2c9bba50d2/fsspec/utils.py#L108

https://github.com/fsspec/filesystem_spec/blob/8463a6a587f722f279e987b3e8508f2c9bba50d2/fsspec/utils.py#L108

If that’s not possible, I’ll implement a simplified equivalent of url_to_fs. Just figured I’d ask first :)

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start in fsspec/utils.py around the url_to_fs code at the linked line, and inspect how the username and password are extracted from URLs. Check Python urllib’s unquote behavior and existing callers before deciding how encoded credentials should be handled. Done means URLs with encoded username or password characters are parsed successfully without breaking unencoded credentials.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.