Skip to content

Commit 995d65a

Browse files
Merge pull request #113 from GridProtectionAlliance/DataHubUpdate
Updated system to set initial value of 'EnableSecureOrderBy' to true
2 parents 661a09e + 97661c2 commit 995d65a

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Source/Applications/openHistorian/openHistorian/App.config

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<add name="eDNAGrafanaControllerEnabled" value="true" description="Defines flag that determines if the eDNA Grafana controller is enabled." encrypted="false"/>
6464
<add name="eDNAMetaData" value="*.*" description="Comma separated search string for the eDNA metadata search command." encrypted="false"/>
6565
<add name="TrenDAPControllerEnabled" value="true" description="Defines flag that determines if the TrenDAP controller is enabled." encrypted="false"/>
66+
<add name="EnableSecureOrderBy" value="True" description="Enables validated security in 'ORDER BY' expressions used by table operations." encrypted="false" />
6667
</systemSettings>
6768
<serviceHelper>
6869
<add name="MonitorServiceHealth" value="True" description="True if the service health is to be monitored; otherwise False." encrypted="false"/>

Source/Applications/openHistorian/openHistorian/AppDebug.config

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<add name="eDNAGrafanaControllerEnabled" value="true" description="Defines flag that determines if the eDNA Grafana controller is enabled." encrypted="false"/>
6464
<add name="eDNAMetaData" value="TP.CALC,TP.MAIN" description="Comma separated search string for the eDNA metadata search command." encrypted="false"/>
6565
<add name="TrenDAPControllerEnabled" value="true" description="Defines flag that determines if the TrenDAP controller is enabled." encrypted="false"/>
66+
<add name="EnableSecureOrderBy" value="True" description="Enables validated security in 'ORDER BY' expressions used by table operations." encrypted="false" />
6667
</systemSettings>
6768
<serviceHelper>
6869
<add name="MonitorServiceHealth" value="True" description="True if the service health is to be monitored; otherwise False." encrypted="false"/>

Source/Applications/openHistorian/openHistorian/ServiceHost.cs

+4
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ public ServiceHost()
135135

136136
if (string.IsNullOrWhiteSpace(systemSettings["MinifyJavascriptExclusionExpression"].Value))
137137
systemSettings["MinifyJavascriptExclusionExpression"].Value = DefaultMinifyJavascriptExclusionExpression;
138+
139+
// Ensure setting exists that will allow for secure order by expressions
140+
systemSettings.Add("EnableSecureOrderBy", true, "Enables validated security in 'ORDER BY' expressions used by table operations.");
141+
ConfigurationFile.Current.Save();
138142
}
139143
catch (Exception ex)
140144
{

0 commit comments

Comments
 (0)