1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-21 09:34:08 +03:00

minor fixes for 3.5

This commit is contained in:
Adolfo Gómez García 2023-03-30 01:20:50 +02:00
parent f158235f16
commit df82c3854c
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23
4 changed files with 12 additions and 5 deletions

View File

@ -151,6 +151,8 @@ class UDSClient(QtWidgets.QMainWindow):
return
except Exception as e:
self.showError(e)
self.closeWindow()
return
self.getTransportData()

View File

@ -127,6 +127,8 @@ class RestApi:
raise InvalidVersion(downloadUrl)
return self._serverVersion
except InvalidVersion:
raise
except Exception as e:
raise UDSException(e)

View File

@ -52,7 +52,7 @@ if typing.TYPE_CHECKING:
logger = logging.getLogger(__name__)
#CLIENT_VERSION = UDS_VERSION
REQUIRED_CLIENT_VERSION = '3.5.1'
REQUIRED_CLIENT_VERSION = '3.6.0'
CLIENT_VERSION = REQUIRED_CLIENT_VERSION
@ -116,9 +116,7 @@ class Client(Handler):
{
'availableVersion': CLIENT_VERSION,
'requiredVersion': REQUIRED_CLIENT_VERSION,
'downloadUrl': self._request.build_absolute_uri(
reverse('page.client-download')
),
'downloadUrl': 'A new version of UDS Client is required.\nPlease, download it from Client Download section.',
}
)
@ -134,6 +132,11 @@ class Client(Handler):
self._args
) # If more than 2 args, got an error. pylint: disable=unbalanced-tuple-unpacking
hostname = self._params['hostname'] # Or if hostname is not included...
version = self._params.get('version', '0.0.0')
if version < '3.6.0':
return Client.result(error='Client version not supported.\n Please, upgrade it.')
srcIp = self._request.ip
# Ip is optional,

View File

@ -136,7 +136,7 @@ def authCallback_stage2(
return response
except auths.exceptions.Redirect as e:
return HttpResponseRedirect(
request.build_absolute_uri(str(e)) if e.args and e.args[0] else '/'
request.build_absolute_uri(str(e)) if e.args and e.args[0] != '/' else '/'
)
except auths.exceptions.Logout as e:
return webLogout(