From e6188bb8d98574669d5d7f7a7d4c6aa595aeaacf Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sat, 5 Aug 2023 19:21:27 +0530 Subject: damb: invalidate values with newline character --- damb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'damb') diff --git a/damb b/damb index 96d6bab..612619c 100755 --- a/damb +++ b/damb @@ -152,6 +152,10 @@ verify_val() { # verify_val + case "$1" in + *"\n"*) return 1 ;; + esac + case "$(file --brief --dereference --mime-type "$1")" in audio/*|video/*) ;; *) @@ -216,7 +220,7 @@ set_clip() { if [ -n "$WAYLAND_DISPLAY" ]; then dep_check "wl-paste" - _clip="$(wl-paste)" + _clip="$(wl-paste -n)" elif [ -n "$DISPLAY" ]; then dep_check "xclip" _clip="$(xclip -o)" -- cgit v1.2.3