Skip to content

Commit

Permalink
--preset: disallow relative file path #218
Browse files Browse the repository at this point in the history
  • Loading branch information
mviereck committed Jan 30, 2020
1 parent 9283d31 commit ba9f3a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x11docker
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ Miscellaneous:
You can move the created .desktop file to
~/.local/share/applications to get a menu entry.
--license Show license of x11docker (MIT) and exit.
--preset FILE Read a set of predefined options from file FILE.
FILE searched in directory /etc/x11docker/preset,
--preset FILE Read a set of predefined options stored in file FILE.
FILE is searched in directory /etc/x11docker/preset,
in directory ~/.config/x11docker/preset or absolute.
Multiple lines in FILE are allowed.
Expand Down Expand Up @@ -7974,7 +7974,7 @@ parse_options() { # parse cli options
Presetfile=""
[ -f "$Presetdirsystem/${2:-}" ] && Presetfile="$Presetdirsystem/${2:-}"
[ -f "$Presetdirlocal/${2:-}" ] && Presetfile="$Presetdirlocal/${2:-}"
[ -f "${2:-}" ] && Presetfile="${2:-}"
[ -f "/${2:-}" ] && Presetfile="/${2:-}"
[ -f "$Presetfile" ] || error "Option --preset: File not found: ${2:-}
Searching in present working directory and in:
$Presetdirlocal
Expand Down

0 comments on commit ba9f3a8

Please sign in to comment.