mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
chore: Reverse sanitize variable so it defaults to false
This commit is contained in:
@@ -570,7 +570,7 @@ callback_url =
|
||||
|
||||
[panels]
|
||||
enable_alpha = false
|
||||
sanitize_input = true
|
||||
disable_sanitize_input = false
|
||||
|
||||
[enterprise]
|
||||
license_path =
|
||||
|
||||
@@ -166,7 +166,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
|
||||
"externalUserMngLinkUrl": setting.ExternalUserMngLinkUrl,
|
||||
"externalUserMngLinkName": setting.ExternalUserMngLinkName,
|
||||
"viewersCanEdit": setting.ViewersCanEdit,
|
||||
"sanitizeInput": hs.Cfg.SanitizeInput,
|
||||
"disableSanitizeInput": hs.Cfg.DisableSanitizeInput,
|
||||
"buildInfo": map[string]interface{}{
|
||||
"version": setting.BuildVersion,
|
||||
"commit": setting.BuildCommit,
|
||||
|
||||
@@ -90,7 +90,7 @@ var (
|
||||
EmailCodeValidMinutes int
|
||||
DataProxyWhiteList map[string]bool
|
||||
DisableBruteForceLoginProtection bool
|
||||
SanitizeInput bool
|
||||
DisableSanitizeInput bool
|
||||
|
||||
// Snapshots
|
||||
ExternalSnapshotUrl string
|
||||
@@ -223,7 +223,7 @@ type Cfg struct {
|
||||
MetricsEndpointBasicAuthUsername string
|
||||
MetricsEndpointBasicAuthPassword string
|
||||
EnableAlphaPanels bool
|
||||
SanitizeInput bool
|
||||
DisableSanitizeInput bool
|
||||
EnterpriseLicensePath string
|
||||
}
|
||||
|
||||
@@ -711,7 +711,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
|
||||
|
||||
panels := iniFile.Section("panels")
|
||||
cfg.EnableAlphaPanels = panels.Key("enable_alpha").MustBool(false)
|
||||
cfg.SanitizeInput = panels.Key("sanitize_input").MustBool(true)
|
||||
cfg.DisableSanitizeInput = panels.Key("sanitize_input_disabled").MustBool(false)
|
||||
|
||||
cfg.readSessionConfig()
|
||||
cfg.readSmtpSettings()
|
||||
|
||||
@@ -35,7 +35,7 @@ export class Settings {
|
||||
loginHint: any;
|
||||
loginError: any;
|
||||
viewersCanEdit: boolean;
|
||||
sanitizeInput: boolean;
|
||||
disableSanitizeInput: boolean;
|
||||
|
||||
constructor(options: Settings) {
|
||||
const defaults = {
|
||||
@@ -53,7 +53,7 @@ export class Settings {
|
||||
isEnterprise: false,
|
||||
},
|
||||
viewersCanEdit: false,
|
||||
sanitizeInput: true
|
||||
disableSanitizeInput: false
|
||||
};
|
||||
|
||||
_.extend(this, defaults, options);
|
||||
|
||||
Reference in New Issue
Block a user