Home GnuPG

Escape forward slashes in URI usernames/passwords properly
4a2238fc8605Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Escape forward slashes in URI usernames/passwords properly

Summary: Fixes T11079. We currently un-escape / in phutil_escape_uri() because it is safe to leave unescaped in paths and an awful UX to escape, but it must be escaped in usernames/passwords.

Test Plan:

  • Added failing unit test.
  • Fixed test.
  • Created a credential with username and password containing a slash.
  • Set this credential on an observation URI for a repository.
  • Used bin/repository update R... to pull the repostiory.
  • Before patch, got an error about a malfored URI.
  • After patch, things worked properly.
Cloning into bare repository '/Users/epriestley/dev/core/repo/local/55'...
fatal: unable to access 'https://slash/slash:slash/slash@github.com/epriestley/poems.git/': Could not resolve host: slash

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11079

Differential Revision: https://secure.phabricator.com/D16009

Details

Provenance
epriestley <git@epriestley.com>Authored on Jun 2 2016, 3:49 PM
Parents
rPHUTIL2c47bbeaf753: Make remarkup link generation rules more flexible and consistent
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUTIL4a2238fc8605: Escape forward slashes in URI usernames/passwords properly (authored by epriestley <git@epriestley.com>).Jun 2 2016, 3:53 PM