Skip to content

fix: keep typer from printing locals on crash#163

Merged
elizabethlorenc merged 1 commit into
mainfrom
fix-keep-typer-from-printing-locals
Jul 30, 2025
Merged

fix: keep typer from printing locals on crash#163
elizabethlorenc merged 1 commit into
mainfrom
fix-keep-typer-from-printing-locals

Conversation

@elizabethlorenc

Copy link
Copy Markdown
Contributor

otherwise XNAT / Brown passwords will be saved in sbatch log files

otherwise XNAT / Brown passwords will be saved in sbatch log files
@elizabethlorenc elizabethlorenc linked an issue Jul 28, 2025 that may be closed by this pull request

@mirestrepo mirestrepo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good solution for now but I'll make an issue to revisit

Comment thread xnat_tools/xnat2bids.py
from xnat_tools.xnat_utils import establish_connection, get_project_subject_session

app = typer.Typer()
app = typer.Typer(pretty_exceptions_show_locals=False)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bring back printing of variables during exceptions in the future by obsfuscating the password. We can do that by resetting the value of the variable, hashing it, and also using tokens

@elizabethlorenc
elizabethlorenc merged commit 183fa7d into main Jul 30, 2025
5 checks passed
@elizabethlorenc
elizabethlorenc deleted the fix-keep-typer-from-printing-locals branch July 30, 2025 15:17
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.

typer prints local variables on crash, including password

2 participants