Skip to content
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

CaseInsensitiveOrderedMultiDict breaks url.X.insteadOf config when using access token in URL #1183

Open
sjawhar opened this issue Jun 1, 2023 · 0 comments

Comments

@sjawhar
Copy link

sjawhar commented Jun 1, 2023

Since ConfigDict uses a CaseInsensitiveOrderedMultiDict to store its values, and since access tokens are not case-inensitive, using url.insteadOf to insert credentials into the clone URL does not work (unless your access token happens to be all lower case)

dulwich/dulwich/config.py

Lines 254 to 268 in 264c5b6

class ConfigDict(Config, MutableMapping[Section, MutableMapping[Name, Value]]):
"""Git configuration stored in a dictionary."""
def __init__(
self,
values: Union[
MutableMapping[Section, MutableMapping[Name, Value]], None
] = None,
encoding: Union[str, None] = None
) -> None:
"""Create a new ConfigDict."""
if encoding is None:
encoding = sys.getdefaultencoding()
self.encoding = encoding
self._values = CaseInsensitiveOrderedMultiDict.make(values)

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

No branches or pull requests

1 participant