summaryrefslogtreecommitdiff
path: root/spec/ruby/core/kernel
diff options
context:
space:
mode:
authorDaniel Niknam <mhmd.niknam@gmail.com>2021-08-22 01:31:03 +1000
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commitb41802421ac7e790a98ed59be67631687fc5808f (patch)
tree87886d29e29bec9f30790ea7cd12a89befc4f746 /spec/ruby/core/kernel
parent14a9e24f7ea161056b56f4833fd8bbecd7718905 (diff)
[rubygems/rubygems] Introduce `Gem::PrintableUri` that would redact URIs to be used on outputs
We need to redact URI credential in several places and copy pasting the code into each part of it is not ideal. This class is responsible for parsing URI strings and redacting credential from it. Also, it will handle URI object in the same manner. We will be reusing this class whenever we need to print/display a URI to users. URI with the following format will be redacted: - Token: `http://my-secure-token@example.com` => `http://REDACTED@example.com` - Username & Password: `http://my-username:my-secure-password@example.com` => `http://my-username:REDACTED@example.com` - x-oauth-basic: `http://my-secure-token:x-oauth-basic@example.com` => `http://REDACTED:x-oauth-basic@example.com` https://github.com/rubygems/rubygems/commit/f1e45d3a89
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'spec/ruby/core/kernel')
0 files changed, 0 insertions, 0 deletions