-
Notifications
You must be signed in to change notification settings - Fork 143
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
Reject invalid script_payload credential_fields #1241
Reject invalid script_payload credential_fields #1241
Conversation
When mapping credentials ensure that only valid credential fields are used.
9b5b98d
to
8f1509b
Compare
Checked commit agrare@8f1509b with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint |
credential_ref, credential_field = ref.values_at("credential_ref", "credential_field") | ||
|
||
credential_class = credentials_by_ems_ref[credential_ref].class | ||
allowed_credential_fields = defined?(credential_class::API_ATTRIBUTES) ? credential_class::API_ATTRIBUTES.pluck(:id) : [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
credential_class::API_ATTRIBUTES.pluck(:id)
- This seems like something we could expose in core
Backported to
|
…ipt_payload_credentials_credential_field Reject invalid script_payload credential_fields (cherry picked from commit dfca21a)
When mapping credentials ensure that only valid credential fields are used.
Ref: ManageIQ/manageiq-ui-classic#8905 (review)