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: fix server selection in update-user #14727

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

Conversation

RochMoreau
Copy link

@RochMoreau RochMoreau commented Jun 11, 2024

Fixes server selection in update-user while preserving a nice display of server along with its alt_name in the list

Description

This commit fixes a bug preventing correct selection of server when trying to update users. It improves the prompt's clarity by providing both server name and IP_subject_alt_name. It also ensures server selection from the list uses actual server names instead of list descriptions strings that caused the initial bug.

The previous code was using directly the strings generated from the "Build list of installed servers" as server identifier.
A previous commit (#14718) introduced some display-related text in the string provoking errors at the step "Server address prompt" since the provided strings no longer represent server identity.

2 possible choices:

  1. Keep the initial system of passing strings from "Build list of installed servers" to "Server address prompt"
  2. Benefits: It works, it was the initial behavior before Use legacy OpenSSL Format for Apple Devices #14718
  3. Drawback 1: Cannot display some helpful data in the prompt like the IP_subject_alt_name of the server
  4. Drawback 2: Prone to the same error in the future if somebody adds new display-related data in the strings
  5. Make "Build list of installed servers" return an array of object and "Server address prompt" pick only relevant properties for display, and relevant properties for server selection
  6. Benefit 1: Future-proof, the code is clear in the intent and the risk of re-introducing a breaking change is low
  7. Benefit 2: Keeps a nice display of the servers for selection, using IP (name)
  8. Drawback: The code is a bit more complex since it now handles objects instead of plain strings, but this could count as a benefit too because now the manipulated data is explicitly named with object keys

This PR went with the option 2

Motivation and Context

Solves issue #14726

How Has This Been Tested?

Manually tested using the same reproduction steps provided in issue #14726

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • [] My change requires a change to the documentation.
  • [] I have updated the documentation accordingly.
  • [] I have added tests to cover my changes.
  • [] All new and existing tests passed.

…y of server along with its alt_name in the list

This commit fixes a bug preventing correct selection of server when trying to update users. It improves the prompt's clarity by providing both server name and IP_subject_alt_name. It also ensures server selection from the list uses actual server names instead of list descriptions strings that caused the initial bug.
@CLAassistant
Copy link

CLAassistant commented Jun 11, 2024

CLA assistant check
All committers have signed the CLA.

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.

None yet

2 participants