]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Fix f5-auth-and-config tests not to depend on cookies
authorDaniel Lenski <dlenski@gmail.com>
Sat, 17 Apr 2021 14:12:45 +0000 (07:12 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 21 Apr 2021 12:12:31 +0000 (13:12 +0100)
Tests depended on cookies propagating all the way to the tunnel
connection ('GET /tmyvpn'). Real servers don't need to see the cookie
at this point though, and for the DTLS connection we don't *want* to
include it because the resulting packet could end up too large. So
don't require it.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
tests/fake-f5-server.py

index 06faa7a3e2381438a30272e27860818d55c91a5e..92ea716574be7398b1f726bdcf0968abc56697f2 100755 (executable)
@@ -207,7 +207,8 @@ def options():
 # (what the real F5 server responds with when it doesn't like the parameters, intended
 # to trigger "cookie rejected" error in OpenConnect)
 @app.route('/myvpn')
-@check_form_against_session('sess', 'hdlc_framing', 'ipv4', 'ipv6', 'Z', use_query=True)
+# Can't use because OpenConnect doesn't send cookies here (see f5.c for why)
+# @check_form_against_session('sess', 'hdlc_framing', 'ipv4', 'ipv6', 'Z', use_query=True)
 def tunnel():
     try:
         base64.urlsafe_b64decode(request.args.get('hostname') or None)