mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
kitty +open: Ask for permission before executing script files that are not marked as executable
This prevents accidental execution of script files via MIME type association from programs that unconditionally "open" attachments/downloaded files via MIME type associations.
This commit is contained in:
@@ -67,4 +67,13 @@ func KittyToolEntryPoints(root *cli.Command) {
|
||||
return
|
||||
},
|
||||
})
|
||||
// __confirm_and_run_shebang__
|
||||
root.AddSubCommand(&cli.Command{
|
||||
Name: "__confirm_and_run_shebang__",
|
||||
Hidden: true,
|
||||
OnlyArgsAllowed: true,
|
||||
Run: func(cmd *cli.Command, args []string) (rc int, err error) {
|
||||
return confirm_and_run_shebang(args)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user