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

error #2196

Closed
wants to merge 1 commit into from
Closed

error #2196

wants to merge 1 commit into from

Conversation

mattmundell
Copy link
Contributor

What

In the GET_CREDENTIALS handler, add a return after the credential format error.

Why

The return is required else gvmd also sends the credentials after the error response.

This format error can be invoked by calling GET_CREDENTIALS with an erroneous format attribute, for example:

$ o m m '<get_credentials format="err" filter="rows=1 sort=name"/>'

Here's the response before the PR (note the extra get_credentials_response element):

<get_credentials_response status="400" status_text="Format attribute should be 'key', 'rpm', 'deb', 'exe' or 'pem'" />
<get_credentials_response status="200" status_text="OK">
  <credential id="c1e69303-bd6b-4c02-860b-8c41f34064f4">
  ...

Here's the response after the PR, with the single correct element:

<get_credentials_response status="400"
status_text="Format attribute should be 'key', 'rpm', 'deb', 'exe' or 'pem'" />```

@mattmundell mattmundell requested a review from a team as a code owner May 13, 2024 16:56
@mattmundell mattmundell deleted the get-credentials-missing-return branch May 13, 2024 16:57
Copy link

Conventional Commits Report

Type Number
Bug Fixes 1

🚀 Conventional commits found.

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.

1 participant