Skip to content

Commit 731fdea

Browse files
Ojas Malwankarmeta-codesync[bot]
authored andcommitted
Make RedactedString.value return SecretString
Differential Revision: D84084589 fbshipit-source-id: c9b11059c9b96975244e84474d39bbe007896c47
1 parent 145f830 commit 731fdea

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cookbooks/fb_helpers/libraries/redacted_string.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212

1313
module FB
1414
class Helpers
15+
class SecretString < String
16+
def to_s
17+
self
18+
end
19+
end
20+
1521
class RedactedString < String
1622
def initialize(*args)
1723
# Have the internal value be REDACTED to cover off cases we missed!
@@ -22,7 +28,7 @@ def initialize(*args)
2228
end
2329

2430
def value
25-
@actual_string
31+
FB::Helpers::SecretString.new(@actual_string)
2632
end
2733

2834
def to_s

0 commit comments

Comments
 (0)