Tryton - Issues

 

Issue9408

Title Entering wrong URL locks the user out of the profile editor
Priority bug Status chatting
Superseder Nosy List edbo
Type Components tryton
Assigned To Keywords
Reviews

Created on 2020-06-12.18:17:17 by edbo, last changed by edbo.

Messages
msg58666 (view) Author: [hidden] (edbo) Date: 2020-06-12.18:20:46
> The only way out, it to edit manually the tryton.conf file and remove the entry there.

Entered the wrong file. It should be profiles.cfg.
msg58665 (view) Author: [hidden] (edbo) Date: 2020-06-12.18:17:16
You can manage the profiles in the Tryton client, by opening a new window. On the left you can add a new profile name and on the right you fill the variables, like host, database and username.

However, when you accidentally enter something WITH spaces into the host field and leave the field, you are done. Everything is greyed out, including the buttons. The weird thing is that the username field is still editable where I would expect the host field to be editable. There is also no possibility to remove the troubling entry because clicking on it will already cause the error. 

The error:

ERROR:tryton.common.common:  File "/home/ERP/tryton-5.6.1/tryton/gui/window/dblogin.py", line 309, in refresh_databases_end
    if self.test_server_version(host, port) is False:
  File "/home/ERP/tryton-5.6.1/tryton/gui/window/dblogin.py", line 279, in test_server_version
    version = rpc.server_version(host, port)
  File "/home/ERP/tryton-5.6.1/tryton/rpc.py", line 67, in server_version
    result = connection.common.server.version()
  File "/usr/lib64/python3.8/xmlrpc/client.py", line 1109, in __call__
    return self.__send(self.__name, args)
  File "/home/ERP/tryton-5.6.1/tryton/jsonrpc.py", line 291, in __request
    response = self.__transport.request(
  File "/usr/lib64/python3.8/xmlrpc/client.py", line 1153, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python3.8/xmlrpc/client.py", line 1165, in single_request
    http_conn = self.send_request(host, handler, request_body, verbose)
  File "/usr/lib64/python3.8/xmlrpc/client.py", line 1266, in send_request
    connection = self.make_connection(host)
  File "/home/ERP/tryton-5.6.1/tryton/jsonrpc.py", line 238, in make_connection
    fingerprint = https_connection(allow_http=True)
  File "/home/ERP/tryton-5.6.1/tryton/jsonrpc.py", line 208, in https_connection
    self._connection = host, HTTPSConnection(host,
  File "/usr/lib64/python3.8/http/client.py", line 1367, in __init__
    super(HTTPSConnection, self).__init__(host, port, timeout,
  File "/usr/lib64/python3.8/http/client.py", line 831, in __init__
    self._validate_host(self.host)
  File "/usr/lib64/python3.8/http/client.py", line 1193, in _validate_host
    raise InvalidURL(f"URL can't contain control characters. {host!r} "

InvalidURL: URL can't contain control characters. 'Test Server' (found at least ' ')

The only way out, it to edit manually the tryton.conf file and remove the entry there.
History
Date User Action Args
2020-06-12 18:20:47edbosetstatus: unread -> chatting
messages: + msg58666
2020-06-12 18:17:17edbocreate