• Kevin Cernekee's avatar
    http: Fix redirect handling in auth form loop · 8e1fda4f
    Kevin Cernekee authored
    The gateway may ask the user to fill out different forms that live at
    different URLs, e.g.
    
        GET /+webvpn+/index.html
        (returns <form method="post" action="/+webvpn+/index.html"> and
         username/password form elements)
        POST /+webvpn+/index.html
        (returns <form method="post" action="/+webvpn+/login/challenge.html">
         and challenge/response form elements)
        POST /+webvpn+/login/challenge.html
        (returns <auth> node with valid cookie)
    
    The refactored openconnect_obtain_cookie() loop tried to post the
    challenge/response data to index.html, preventing successful login.  This
    patch changes the logic so that it will honor the new "action" attribute
    if present.
    
    This probably does not affect XML POST mode, because XML POST <form> tags
    do not seem to use attributes.
    Reported-by: default avatarFabian Jäger <fabian.jaeger@chungwasoft.com>
    Signed-off-by: default avatarKevin Cernekee <cernekee@gmail.com>
    Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
    8e1fda4f
Name
Last commit
Last update
.tx Loading commit data...
po Loading commit data...
www Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
Android.mk Loading commit data...
COPYING.LGPL Loading commit data...
Makefile.am Loading commit data...
README.DTLS Loading commit data...
TODO Loading commit data...
acinclude.m4 Loading commit data...
auth.c Loading commit data...
autogen.sh Loading commit data...
compat.c Loading commit data...
configure.ac Loading commit data...
cstp.c Loading commit data...
dtls.c Loading commit data...
gnutls.c Loading commit data...
gnutls.h Loading commit data...
gnutls_pkcs12.c Loading commit data...
gnutls_tpm.c Loading commit data...
http.c Loading commit data...
libopenconnect.map.in Loading commit data...
library.c Loading commit data...
main.c Loading commit data...
mainloop.c Loading commit data...
openconnect-internal.h Loading commit data...
openconnect.8.in Loading commit data...
openconnect.h Loading commit data...
openconnect.pc.in Loading commit data...
openssl.c Loading commit data...
ssl.c Loading commit data...
ssl_ui.c Loading commit data...
tun.c Loading commit data...
version.sh Loading commit data...
xml.c Loading commit data...