Commit 1d4873b7 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

fixed problem with login in register

parent 3e48b13d
...@@ -292,14 +292,14 @@ def register(config): ...@@ -292,14 +292,14 @@ def register(config):
user_id = get_login() user_id = get_login()
if check_login(user_id,config.master_url_web): break if check_login(user_id,config.master_url_web): break
config.logger.warning ("Wrong login/password") config.logger.warning ("Wrong login/password")
elif config.password == None :
if not check_login(base64.encodestring('%s:%s' % (config.login,getpass()))[:-1],config.master_url_web):
config.logger.error ("Wrong login/password")
return 1
else: else:
if not check_login(base64.encodestring('%s:%s' % (config.login,config.password))[:-1],config.master_url_web): if config.password == None :
config.password = getpass()
user_id = base64.encodestring('%s:%s' % (config.login,config.password))[:-1]
if not check_login(user_id,config.master_url_web):
config.logger.error ("Wrong login/password") config.logger.error ("Wrong login/password")
return 1 return 1
# Get source code of page having certificate and key # Get source code of page having certificate and key
certificate_key = get_certificates(user_id,config.node_name,config.master_url_web) certificate_key = get_certificates(user_id,config.node_name,config.master_url_web)
# Parse certificate and key and get computer id # Parse certificate and key and get computer id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment