Skip to content

Commit

Permalink
don't leak passwords in the process table
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushnix committed Sep 19, 2021
1 parent aa3aa4d commit b5caa67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tessen.bash
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ tsn_find_clip_cmd() {
# function to copy the password
tsn_clip() {
if [[ -n "$WAYLAND_DISPLAY" || "$XDG_SESSION_TYPE" == "wayland" ]]; then
"$TSN_CLIP_CMD" "${1-}"
printf '%s' "${1-}" | "$TSN_CLIP_CMD"
elif [[ "$XDG_SESSION_TYPE" == "x11" || -n "$DISPLAY" ]]; then
"$TSN_CLIP_CMD" "${TSN_CLIP_CMD_ARGS[*]-}" "${1-}"
printf '%s' "${1-}" | "$TSN_CLIP_CMD" "${TSN_CLIP_CMD_ARGS[*]-}"
else
printf '%s\n' "Error: No X11 or Wayland display detected" >&2
exit 1
Expand Down

0 comments on commit b5caa67

Please sign in to comment.