Skip to content

Conversation

@sharmagot
Copy link
Collaborator

This MR adds strict client-side validation for TOTP values in the Python driver to prevent invalid authentication requests from being sent to the server.

Problem

The Python driver currently allows invalid TOTP values (e.g., ot1234, opentext, values shorter/longer than 6 digits) to pass through and reach the server.
This results in unnecessary authentication attempts and inconsistent behavior.

Solution

Added explicit validation to ensure TOTP:

Contains only numeric characters (isdigit() check)

Is exactly 6 digits long

Added corresponding error messages and logger entries.

Applied validation both:

When TOTP is passed via connection options

When TOTP is entered interactively during authentication

Expected Behavior

Driver should block invalid TOTP values before sending an authentication request.

Only valid 6-digit numeric TOTP codes should be accepted.

@sharmagot sharmagot self-assigned this Dec 8, 2025
@sharmagot sharmagot requested a review from ssharieff21 December 8, 2025 05:20
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