Skip to content

Conversation

@ysyrota
Copy link
Contributor

@ysyrota ysyrota commented Aug 11, 2025

Description

Added support for extension of user agent strings. Users can now extend a user agent via appendToUserAgent() method of Client class.

Motivation and Context

This change was specifically requested to allow duo_universal_wordpress (the WordPress plugin) to specify its own user agent when making requests to Duo's servers.

How Has This Been Tested?

  • All existing tests pass
  • New test coverage added:
    • testAppendToUserAgent() - verifies that the user agent extension can be set and is included in requests
    • testUserAgentWithoutExtension() - verifies that user agent works correctly without any extension
    • testAppendToUserAgentEmpty() - verifies that empty user agent extension is handled correctly
  • Manual testing with scripts using both default and custom user agent functionality

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)

@AaronAtDuo AaronAtDuo merged commit 5799622 into duosecurity:main Aug 12, 2025
5 checks passed
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