In mac, terminal freezes when taking JWT token as getpass input · Issue #157538 · python/cpython · GitHub
Skip to content

In mac, terminal freezes when taking JWT token as getpass input #157538

Description

@y09esh

Bug report

Bug description:

Issue Title: Terminal freezes on macOS when passing a JWT token via getpass
Summary
When attempting to input a long string—specifically a JSON Web Token (JWT)—using Python's getpass module in the macOS Terminal, the terminal application hangs and freezes completely, requiring a force quit.

Steps to Reproduce
Open Terminal (or iTerm2) on macOS.

Run a Python script or interactive shell that calls getpass.getpass().

Paste a standard long JWT string into the prompt.

Observe the terminal freeze/hang.

Expected Behavior
The terminal should accept the input securely (masking characters if applicable) without locking up, allowing the script to proceed.

Actual Behavior
The terminal interface stops responding entirely

Environment
OS: macOS (any version 10+)

CPython versions tested on:

3.13

Operating systems tested on:

macOS

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions