Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
6730c660
Commit
6730c660
authored
Sep 15, 2016
by
Jordan Rodak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove password from logging of configuration string.
parent
5688bc11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
ConfigurationOptions.cs
...xchange.Redis/StackExchange/Redis/ConfigurationOptions.cs
+13
-2
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+1
-1
No files found.
StackExchange.Redis/StackExchange/Redis/ConfigurationOptions.cs
View file @
6730c660
...
@@ -366,9 +366,20 @@ public void SetDefaultPorts()
...
@@ -366,9 +366,20 @@ public void SetDefaultPorts()
}
}
/// <summary>
/// <summary>
/// Returns the effective configuration string for this configuration
/// Returns the effective configuration string for this configuration
, including Redis credentials.
/// </summary>
/// </summary>
public
override
string
ToString
()
public
override
string
ToString
()
{
// include password to allow generation of configuration strings
// used for connecting multiplexer
return
ToString
(
includePassword
:
true
);
}
/// <summary>
/// Returns the effective configuration string for this configuration
/// with the option to include or exclude the password from the string.
/// </summary>
public
string
ToString
(
bool
includePassword
)
{
{
var
sb
=
new
StringBuilder
();
var
sb
=
new
StringBuilder
();
foreach
(
var
endpoint
in
endpoints
)
foreach
(
var
endpoint
in
endpoints
)
...
@@ -382,7 +393,7 @@ public override string ToString()
...
@@ -382,7 +393,7 @@ public override string ToString()
Append
(
sb
,
OptionKeys
.
AllowAdmin
,
allowAdmin
);
Append
(
sb
,
OptionKeys
.
AllowAdmin
,
allowAdmin
);
Append
(
sb
,
OptionKeys
.
Version
,
defaultVersion
);
Append
(
sb
,
OptionKeys
.
Version
,
defaultVersion
);
Append
(
sb
,
OptionKeys
.
ConnectTimeout
,
connectTimeout
);
Append
(
sb
,
OptionKeys
.
ConnectTimeout
,
connectTimeout
);
Append
(
sb
,
OptionKeys
.
Password
,
password
);
Append
(
sb
,
OptionKeys
.
Password
,
includePassword
?
password
:
"*****"
);
Append
(
sb
,
OptionKeys
.
TieBreaker
,
tieBreaker
);
Append
(
sb
,
OptionKeys
.
TieBreaker
,
tieBreaker
);
Append
(
sb
,
OptionKeys
.
WriteBuffer
,
writeBuffer
);
Append
(
sb
,
OptionKeys
.
WriteBuffer
,
writeBuffer
);
Append
(
sb
,
OptionKeys
.
Ssl
,
ssl
);
Append
(
sb
,
OptionKeys
.
Ssl
,
ssl
);
...
...
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
6730c660
...
@@ -1197,7 +1197,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
...
@@ -1197,7 +1197,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
Trace
(
"Starting reconfiguration..."
);
Trace
(
"Starting reconfiguration..."
);
Trace
(
blame
!=
null
,
"Blaming: "
+
Format
.
ToString
(
blame
));
Trace
(
blame
!=
null
,
"Blaming: "
+
Format
.
ToString
(
blame
));
LogLocked
(
log
,
Configuration
);
LogLocked
(
log
,
configuration
.
ToString
(
includePassword
:
false
)
);
LogLocked
(
log
,
""
);
LogLocked
(
log
,
""
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment