Skip to content

Commit

Permalink
Require Alias and Context for *-APP commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jajik committed Oct 9, 2024
1 parent 3c968c6 commit 8931501
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions native/mod_manager/mod_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#define SCONBIG "SYNTAX: Context field too big"
#define SALIBAD "SYNTAX: Alias without Context"
#define SCONBAD "SYNTAX: Context without Alias"
#define NOCONAL "SYNTAX: No Context and Alias in APP command"
#define SBADFLD "SYNTAX: Invalid field \"%s\" in message"
#define SMISFLD "SYNTAX: Mandatory field(s) missing in message"
#define SCMDUNS "SYNTAX: Command is not supported"
Expand Down Expand Up @@ -2107,6 +2108,12 @@ static char *process_appl_cmd(request_rec *r, char **ptr, int status, int *errty
*errtype = TYPESYNTAX;
return SROUBAD;
}

if (vhost->context == NULL && vhost->host == NULL) {
*errtype = TYPESYNTAX;
return NOCONAL;
}

if (vhost->context == NULL && vhost->host != NULL) {
*errtype = TYPESYNTAX;
return SALIBAD;
Expand Down

0 comments on commit 8931501

Please sign in to comment.