security/openconnect: support more user name chars; closes #3428

This commit is contained in:
Franco Fichtner
2023-11-06 09:10:18 +01:00
parent f1c56492b8
commit a5f7a2773c
4 changed files with 42 additions and 42 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= openconnect
PLUGIN_VERSION= 1.4.4
PLUGIN_VERSION= 1.4.5
PLUGIN_COMMENT= OpenConnect Client
PLUGIN_DEPENDS= openconnect
PLUGIN_MAINTAINER= m.muenz@gmail.com
+4
View File
@@ -6,6 +6,10 @@ the Juniper SSL VPN which is now known as Pulse Connect Secure.
Plugin Changelog
================
1.4.5
* Allow ":" and "/" characters in user name
1.4.4
* Improve compatibility via useragent="AnyConnect"
@@ -4,33 +4,32 @@
<version>1.0.3</version>
<items>
<enabled type="BooleanField">
<default>0</default>
<Default>0</Default>
<Required>Y</Required>
</enabled>
<server type="TextField">
<default>server</default>
<Default>server</Default>
<Required>Y</Required>
<mask>/\S*/</mask>
<Mask>/\S*/</Mask>
<ValidationMessage>Please provide IP or hostname (no spaces allowed).</ValidationMessage>
</server>
<user type="TextField">
<default>user</default>
<Default>user</Default>
<Required>Y</Required>
<mask>/^[a-zA-Z0-9.\@_-]{1,64}$/</mask>
<ValidationMessage>Please provide a valid username. Allowed characters are a-zA-Z0-9._-@ and it has to be 1-64 characters long.</ValidationMessage>
<Mask>/^[a-zA-Z0-9.\@_\-:\/]{1,64}$/</Mask>
<ValidationMessage>Please provide a valid username. Allowed characters are a-zA-Z0-9.@_-:/ and it has to be 1-64 characters long.</ValidationMessage>
</user>
<password type="TextField">
<default>password</default>
<Default>password</Default>
<Required>Y</Required>
</password>
<servercert type="TextField">
<Required>N</Required>
<mask>/^([a-zA-Z0-9\/\+\=]){40,64}$/u</mask>
<Mask>/^([a-zA-Z0-9\/\+\=]){40,64}$/u</Mask>
<ValidationMessage>Please provide a valid hash.</ValidationMessage>
</servercert>
<hash type="OptionField">
<default>sha256</default>
<multiple>N</multiple>
<Default>sha256</Default>
<Required>Y</Required>
<OptionValues>
<sha256>SHA256</sha256>
@@ -40,7 +39,7 @@
</hash>
<group type="TextField">
<Required>N</Required>
<mask>/^[() a-zA-Z0-9._-]{1,64}$/</mask>
<Mask>/^[() a-zA-Z0-9._-]{1,64}$/</Mask>
<ValidationMessage>Please provide a valid group name. Allowed are at most 64 characters from a-zA-Z0-9._-() and space.</ValidationMessage>
</group>
<clientcertificate type="CertificateField">
@@ -60,8 +59,7 @@
<Required>N</Required>
</tokensecret>
<protocol type="OptionField">
<default>anyconnect</default>
<multiple>N</multiple>
<Default>anyconnect</Default>
<Required>Y</Required>
<OptionValues>
<anyconnect>Cisco AnyConnect</anyconnect>
@@ -1,35 +1,33 @@
{#
# Copyright (c) 2014-2018 Deciso B.V.
# Copyright (c) 2018 Michael Muenz <m.muenz@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#}
OPNsense® is Copyright © 2014 2018 by Deciso B.V.
This file is Copyright © 2018 by Michael Muenz <m.muenz@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
#}
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}}
<div class="col-md-12">
<hr />
<div class="col-md-12 __mt">
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
</div>
</div>