Skip to content

Conversation

@bensallen
Copy link
Contributor

Description

Fix user.URLValues() to also skip pointer values that are zero values. Previously user.URLValues() would return a []string{""} for the pointer struct attributes if empty.

Motivation and Context

When the output of URLValues() was used as input to ModifyUser, for example, the attributes incorrectly set to []string{""} would result in the user having those values set to "" via the Admin API. Resulting in unexpected attribute changes.

How Has This Been Tested?

Added additional test case that includes the possible types of zero values, as well as a live test against a Duo instance's Admin API.

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 change)

…y user.URLValues() would return a []string{} for the pointer struct attributes if empty.
@bensallen bensallen changed the title Fix user.URLValues() to skip pointer values that are empty. Previousl… Fix user.URLValues() to skip pointer values that are empty Oct 21, 2025
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