Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix custom_message with non-alphanumeric characters #434

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gnyahay
Copy link
Contributor

@gnyahay gnyahay commented Jan 21, 2025

Add quotes to the custom message in the helm chart template for UI config map.
Along with HTML encoding the message the following error is fixed:

/home/node/aui/build/node_modules/js-yaml/lib/loader.js:183
  return new YAMLException(message, mark);
         ^
YAMLException: bad indentation of a mapping entry (15:229)
 12 |  ... 
 13 |  ... 
 14 |  ... 
 15 |  ... nt to the following conditions: - The USG routinely intercept ...
-----------------------------------------^
 16 |  ... 
 17 |  ... 
    at generateError (/home/node/aui/build/node_modules/js-yaml/lib/loader.js:183:10)
    at throwError (/home/node/aui/build/node_modules/js-yaml/lib/loader.js:187:9)
    at readBlockMapping (/home/node/aui/build/node_modules/js-yaml/lib/loader.js:1182:7)
    at composeNode (/home/node/aui/build/node_modules/js-yaml/lib/loader.js:1441:12)
    at readBlockMapping (/home/node/aui/build/node_modules/js-yaml/lib/loader.js:1164:11)
    at composeNode (/home/node/aui/build/node_modules/js-yaml/lib/loader.js:1441:12)
    at readDocument (/home/node/aui/build/node_modules/js-yaml/lib/loader.js:1625:3)
    at loadDocuments (/home/node/aui/build/node_modules/js-yaml/lib/loader.js:1688:5)
    at Object.yaml (/home/node/aui/build/node_modules/js-yaml/lib/loader.js:1714:19)
    at /anchore-on-prem-ui/src/config/configYaml.js:18:19

Signed-off-by: Greg Nyahay <greg.nyahay@anchore.com>
@gnyahay gnyahay requested a review from holt January 21, 2025 17:55
@gnyahay gnyahay marked this pull request as ready for review January 21, 2025 18:21
@gnyahay gnyahay requested a review from a team as a code owner January 21, 2025 18:21
@@ -23,8 +23,8 @@ data:
{{- end }}
{{- with .Values.anchoreConfig.ui.custom_message }}
custom_message:
title: {{ .title }}
message: {{ .message }}
title: '{{ .title }}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use quote or squote instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants