mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Limit number of paths returned via glob() for authorized users
using tilde expansion.
This commit is contained in:
parent
1fd931b580
commit
6d3fe674ce
1 changed files with 4 additions and 0 deletions
|
|
@ -947,6 +947,8 @@ pathname
|
|||
GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
|
||||
|
||||
memset(&gl, 0, sizeof(gl));
|
||||
flags |= GLOB_MAXPATH;
|
||||
gl.gl_matchc = MAXGLOBARGS;
|
||||
if (glob($1, flags, NULL, &gl) ||
|
||||
gl.gl_pathc == 0) {
|
||||
reply(550, "not found");
|
||||
|
|
@ -1037,6 +1039,8 @@ extern jmp_buf errcatch;
|
|||
#define SITECMD 7 /* SITE command */
|
||||
#define NSTR 8 /* Number followed by a string */
|
||||
|
||||
#define MAXGLOBARGS 1000
|
||||
|
||||
struct tab {
|
||||
char *name;
|
||||
short token;
|
||||
|
|
|
|||
Loading…
Reference in a new issue