Skip to content

Commit

Permalink
GP: fix bug in blind retry of login credentials after portal-to-gatew…
Browse files Browse the repository at this point in the history
…ay redirect

We had been incorrectly relying on the first character of the 'auth_id'
being '_' to indicate a non-challenge form, in which case the
username/password can be "blindly retried" from portal to gateway.

However, this has been wrong since v8.09 (specifically, the commit
593df6b). Unfortunately, it may be
responsible for some user reports of inability to login via portal
interface.

Discovered while writing gp-auth-and-config tests.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
  • Loading branch information
dlenski committed May 3, 2021
1 parent cbb75f7 commit 9b5652e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth-globalprotect.c
Expand Up @@ -649,7 +649,7 @@ static int gpst_login(struct openconnect_info *vpninfo, int portal, struct login
* unless it was a challenge auth form or alt-secret form.
*/
portal = 0;
if (ctx->form->auth_id[0] == '_' && !ctx->alt_secret) {
if (strcmp(ctx->form->auth_id, "_challenge") && !ctx->alt_secret) {
blind_retry = 1;
goto replay_form;
}
Expand Down

0 comments on commit 9b5652e

Please sign in to comment.