Skip to content

Commit

Permalink
Removing username and password in SQL connection string to prevent Co…
Browse files Browse the repository at this point in the history
…deQL rule id cs/password-in-configuration false positive
  • Loading branch information
justinmichaels authored and FreeAndNil committed Feb 9, 2024
1 parent f0771d0 commit 2a013ea
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/mono/1.0/Tutorials/ConsoleApp/cs/src/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<appender name="ADONetAppender_SqlServer" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;User ID=sa;Password=sa" />
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;" />
<commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)" />
<parameter>
<parameterName value="@log_date" />
Expand Down
2 changes: 1 addition & 1 deletion examples/net/1.1/Tutorials/ConsoleApp/cpp/src/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<appender name="ADONetAppender_SqlServer" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;User ID=sa;Password=sa" />
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;" />
<commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)" />
<parameter>
<parameterName value="@log_date" />
Expand Down
2 changes: 1 addition & 1 deletion examples/net/1.1/Tutorials/ConsoleApp/js/src/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<appender name="ADONetAppender_SqlServer" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;User ID=sa;Password=sa" />
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;" />
<commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)" />
<parameter>
<parameterName value="@log_date" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
</appender>

<appender name="FastDbAppender" type="SampleAppendersApp.Appender.FastDbAppender, SampleAppendersApp">
<connectionString value="Persist Security Info=False;Integrated Security=false;server=ate;database=log4net_test;Connect Timeout=30;User ID=sa;Password=sa" />
<connectionString value="Persist Security Info=False;Integrated Security=false;server=ate;database=log4net_test;Connect Timeout=30;" />
</appender>

<appender name="PatternFileAppender" type="SampleAppendersApp.Appender.PatternFileAppender, SampleAppendersApp">
Expand Down
2 changes: 1 addition & 1 deletion examples/net/2.0/Tutorials/ConsoleApp/cs/src/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<appender name="ADONetAppender_SqlServer" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;User ID=sa;Password=sa" />
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;" />
<commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)" />
<parameter>
<parameterName value="@log_date" />
Expand Down
2 changes: 1 addition & 1 deletion examples/net/2.0/Tutorials/ConsoleApp/vb/src/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<appender name="ADONetAppender_SqlServer" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;User ID=sa;Password=sa" />
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;" />
<commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)" />
<parameter>
<parameterName value="@log_date" />
Expand Down
2 changes: 1 addition & 1 deletion src/log4net/Appender/AdoNetAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace log4net.Appender
/// <code lang="XML" escaped="true">
/// <appender name="AdoNetAppender_SqlServer" type="log4net.Appender.AdoNetAppender" >
/// <connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
/// <connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;User ID=sa;Password=sa" />
/// <connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;" />
/// <commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)" />
/// <parameter>
/// <parameterName value="@log_date" />
Expand Down

0 comments on commit 2a013ea

Please sign in to comment.