Skip to content

Commit

Permalink
Refuse to handle forms without ->auth_id
Browse files Browse the repository at this point in the history
GUI authentication dialogs will really want this for saving responses.
And saved_form_field() will crash if it's NULL too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
dwmw2 committed May 4, 2021
1 parent 45366d7 commit 0b47ea1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.c
Expand Up @@ -2494,6 +2494,9 @@ static int process_auth_form_cb(void *_vpninfo,
struct oc_form_opt *opt;
int empty = 1;

if (!form->auth_id)
return -EINVAL;

if (form->banner && verbose > PRG_ERR)
fprintf(stderr, "%s\n", form->banner);

Expand Down

0 comments on commit 0b47ea1

Please sign in to comment.