@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Set reasonable defaults when displaying remote repository URIs.

Summary: Show SSH user on git-over-ssh repositories and hide both username and password for other repos.

Test Plan: View repository details page in diffusion, Clone URI should appear with a username (taken from repo config) and any http(s) repos should be without usernames.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4147

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

authored by

Saulius Zemaitaitis and committed by
epriestley
4910a365 b154b07f

+4 -8
+4 -8
src/applications/repository/storage/PhabricatorRepository.php
··· 580 580 // Make sure we don't leak anything if this repo is using HTTP Basic Auth 581 581 // with the credentials in the URI or something zany like that. 582 582 583 - if ($uri instanceof PhutilGitURI) { 584 - if (!$this->getDetail('show-user', false)) { 585 - $uri->setUser(null); 586 - } 587 - } else { 588 - if (!$this->getDetail('show-user', false)) { 589 - $uri->setUser(null); 590 - } 583 + // If repository is not accessed over SSH we remove both username and 584 + // password. 585 + if (!$this->shouldUseSSH()) { 586 + $uri->setUser(null); 591 587 $uri->setPass(null); 592 588 } 593 589