Skip to content

Commit

Permalink
Parse new static-challenge format option from management interface
Browse files Browse the repository at this point in the history
Parse the flag in SC:<flag>,TEXT directive for static-challenge,
and enable the option to concatenate password and response
if indicated in flag.

Signed-off-by: Selva Nair <[email protected]>
  • Loading branch information
selvanair authored and cron2 committed Sep 10, 2024
1 parent 9279530 commit 5494ebb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openvpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1424,8 +1424,9 @@ OnPassword(connection_t *c, char *msg)
}
else if ( (chstr = strstr(msg, "SC:")) && strlen(chstr) > 5)
{
param->flags |= FLAG_CR_TYPE_SCRV1;
param->flags |= (*(chstr + 3) != '0') ? FLAG_CR_ECHO : 0;
ULONG flags = strtoul(chstr+3, NULL, 10);
param->flags |= (flags & 0x2) ? FLAG_CR_TYPE_CONCAT : FLAG_CR_TYPE_SCRV1;
param->flags |= (flags & 0x1) ? FLAG_CR_ECHO : 0;
param->str = strdup(chstr + 5);
LocalizedDialogBoxParamEx(ID_DLG_AUTH_CHALLENGE, c->hwndStatus, UserAuthDialogFunc, (LPARAM) param);
}
Expand Down

0 comments on commit 5494ebb

Please sign in to comment.