FS#44697 - Internal server error when trying to use the "Share over the net" feature with password protection.

Attached to Project: Community Packages
Opened by Benjamin Sutton (Benguin) - Thursday, 23 April 2015, 02:43 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 23 April 2015, 02:51 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The 'Sharing over the net' feature does not work if the user sets a password of any kind. This works fine if the official binary is used, but not with the arch package on the same system. The site asks for a username and password, and then once entered it returns an error 500 from cherrypy

Additional info:
Package version: calibre-2.25.0-1
python error raised when trying to access the site:

Have posted a bug report to calibre's bug tracker, but they don't accept bug reports for distro packages, and their official binary works fine.

[23/Apr/2015:03:36:21] HTTP Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 670, in respond
response.body = self.handler()
File "/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 217, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 61, in __call__
return self.callable(*self.args, **self.kwargs)
File "/usr/lib/calibre/calibre/library/server/utils.py", line 54, in do
ans = func(*args, **kwargs)
File "/usr/lib/calibre/calibre/library/server/utils.py", line 108, in authenticate
self.secret)
File "/usr/lib/python2.7/site-packages/cherrypy/lib/auth_digest.py", line 364, in digest_auth
ha1 = get_ha1(realm, auth.username)
File "/usr/lib/python2.7/site-packages/cherrypy/lib/auth_digest.py", line 57, in get_ha1
return md5_hex('%s:%s:%s' % (username, realm, password))
File "/usr/lib/python2.7/site-packages/cherrypy/lib/auth_digest.py", line 30, in <lambda>
md5_hex = lambda s: md5(ntob(s)).hexdigest()
File "/usr/lib/python2.7/site-packages/cherrypy/_cpcompat.py", line 68, in ntob
assert_native(n)
File "/usr/lib/python2.7/site-packages/cherrypy/_cpcompat.py", line 111, in assert_native
raise TypeError("n must be a native str (got %s)" % type(n).__name__)
TypeError: n must be a native str (got unicode)


Steps to reproduce:
Go to settings > Sharing over the net, and enter a port, username, and password. Start the server then click test, enter your username and password, and observe the internal server eror. Repeat this without a password and it should work fine.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Thursday, 23 April 2015, 02:51 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#36159 
Comment by Benjamin Sutton (Benguin) - Thursday, 23 April 2015, 02:45 GMT
Ah, my apologies I seem to have deleted the [Calibre] tag from the bug summary. I don't see any way to fix this though..

Loading...