]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
better heuristic for determining where to fill in a token in GP forms
authorDaniel Lenski <dlenski@gmail.com>
Thu, 9 Apr 2020 00:57:26 +0000 (17:57 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Thu, 9 Apr 2020 01:04:25 +0000 (18:04 -0700)
commit0303569d286d360da905b3c014daa99c65075524
tree3f248447c5a4727403285d5ad0871fc9c78b4036
parent593df6b1c09ea525a913d4d8401a95ffdb1877db
better heuristic for determining where to fill in a token in GP forms

GlobalProtect's prelogin doesn't give us much information to determine where
a token code might be filled in.

Current behavior:

1. Use the password file in the first form as a token field.
2. Ignores the fact that a second "challenge" form might be coming.

New heuristic:

1. If the label for the password field in the first form has a non-default
   value (not empty or “Password”), then treat that as the token field.
2. Otherwise, assume a second form ("challenge") is coming, and treat the
   password field in the first form as a normal password, then treat the
   password field in the second form as the token field.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
auth-globalprotect.c