You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2018/04/12 15:31:31 UTC
[ambari] 01/02: AMBARI-23527 Slash not unescaped in property name
This is an automated email from the ASF dual-hosted git repository.
atkach pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit f913ba37919d40a135a15e43ac0be104eb94a53f
Author: Andrii Tkach <at...@apache.org>
AuthorDate: Tue Apr 10 16:30:30 2018 +0300
AMBARI-23527 Slash not unescaped in property name
---
ambari-web/app/mappers/configs/stack_config_properties_mapper.js | 1 +
ambari-web/app/mappers/configs/themes_mapper.js | 2 +-
ambari-web/app/utils/config.js | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/ambari-web/app/mappers/configs/stack_config_properties_mapper.js b/ambari-web/app/mappers/configs/stack_config_properties_mapper.js
index 75a5564..153907c 100644
--- a/ambari-web/app/mappers/configs/stack_config_properties_mapper.js
+++ b/ambari-web/app/mappers/configs/stack_config_properties_mapper.js
@@ -145,6 +145,7 @@ App.stackConfigPropertiesMapper = App.QuickDataMapper.create({
staticConfigInfo.value = staticConfigInfo.recommendedValue = App.config.formatPropertyValue(staticConfigInfo, v);
staticConfigInfo.isSecureConfig = App.config.getIsSecure(staticConfigInfo.name);
staticConfigInfo.description = App.config.getDescription(staticConfigInfo.description, staticConfigInfo.displayType);
+ staticConfigInfo.name = JSON.parse('"' + staticConfigInfo.name + '"');
staticConfigInfo.isUserProperty = false;
App.configsCollection.add(staticConfigInfo);
diff --git a/ambari-web/app/mappers/configs/themes_mapper.js b/ambari-web/app/mappers/configs/themes_mapper.js
index 8d00f3b..cd4bb05 100644
--- a/ambari-web/app/mappers/configs/themes_mapper.js
+++ b/ambari-web/app/mappers/configs/themes_mapper.js
@@ -233,7 +233,7 @@ App.themesMapper = App.QuickDataMapper.create({
showLabel: false,
isOverridable: false,
recommendedValue: true,
- name: configName,
+ name: JSON.parse('"' + configName + '"'),
isUserProperty: false,
filename: fileName,
fileName: fileName,
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 2748464..18bbf29 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -283,6 +283,7 @@ App.config = Em.Object.create({
* @returns {*|Object}
*/
getDefaultConfig: function(name, fileName, coreObject) {
+ name = JSON.parse('"' + name + '"');
var cfg = App.configsCollection.getConfigByName(name, fileName) ||
App.config.createDefaultConfig(name, fileName, false);
if (Em.typeOf(coreObject) === 'object') {
--
To stop receiving notification emails like this one, please contact
atkach@apache.org.