Page MenuHomePhabricator

Censor response bodies from Mercurial error messages
ClosedPublic

Authored by epriestley on Mar 26 2015, 4:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 22 2024, 3:09 AM
Unknown Object (File)
Feb 21 2024, 4:36 PM
Unknown Object (File)
Feb 8 2024, 12:54 AM
Unknown Object (File)
Dec 14 2023, 9:12 PM
Unknown Object (File)
Dec 13 2023, 12:45 AM
Unknown Object (File)
Dec 7 2023, 10:04 AM
Unknown Object (File)
Dec 1 2023, 6:21 AM
Unknown Object (File)
Nov 30 2023, 8:52 AM
Subscribers

Details

Summary

Ref T6755. In Git and Subversion, running git clone http://google.com/ or svn checkout http://google.com/ does not echo the response body.

In Mercurial, it does. Censor it from the output of hg pull and hg clone. This prevents an attacker from:

  • Creating a Mercurial remote repository with URI http://10.0.0.1/secrets/; and
  • reading the secrets out of the error message after the clone fails.
Test Plan

Set a Mercurial remote URI to a non-Mercurial repository, ran repository update, saw censored error message.

Diff Detail

Repository
rP Phabricator
Branch
dnsrebind3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 4989
Build 5007: [Placeholder Plan] Wait for 30 Seconds