Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting a server with --password-file= causes a traceback and the session fails to start #1740

Closed
totaam opened this issue Jan 12, 2018 · 1 comment

Comments

@totaam
Copy link
Collaborator

totaam commented Jan 12, 2018

Issue migrated from trac ticket # 1740

component: server | priority: minor | resolution: fixed

2018-01-12 17:21:45: maxmylyn created the issue


Let me preface this ticket by stating:

Yes, I am aware that --password-file is intended to only be used for clients. I discovered this particular issue after trying to sort out why the automated tests were failing via some trial-and-error (read: disabling features until they finally started working again). As a temporary workaround I've disabled the password authentication for the tests, but I feel there is a bug here in that we don't handle this flag properly (even if it's being misused).

This was tested when trying to start a session on a Fedora 26 machine running a beta xpra v2.3-[r17837](../commit/b2f1276b9667ac08360b1a5ac121778fff3e3031) package from the beta repository.

The server was started with:

xpra start :15 --bind-tcp=0.0.0.0:10000 --start-child=xterm --start-via-proxy=no --systemd-run=no --tcp-auth=file,filename=password.txt --password-file=password.txt -d auth, and I get an immediate traceback:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/scripts/main.py", line 175, in main
    return run_mode(script_file, err, options, args, mode, defaults)
  File "/usr/lib64/python2.7/site-packages/xpra/scripts/main.py", line 1501, in run_mode
    return run_server(error_cb, options, mode, script_file, args, current_display)
  File "/usr/lib64/python2.7/site-packages/xpra/scripts/server.py", line 473, in run_server
    opts.password_file = os.path.abspath(opts.password_file)
  File "/usr/lib64/python2.7/posixpath.py", line 360, in abspath
    if not isabs(path):
  File "/usr/lib64/python2.7/posixpath.py", line 54, in isabs
    return s.startswith('/')
AttributeError: 'list' object has no attribute 'startswith'

Running it again without the --password-file= makes the traceback go away, and the session starts as expected.


Note, I was testing the server start arguments with regards to how the automated tests start the server; specifically the authentication section when I stumbled across this traceback.

@totaam
Copy link
Collaborator Author

totaam commented Jan 13, 2018

Trivial fix in r17992. (was caused by the changes for #1728)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant