Exception raised for invalid username in conf file doesn't indicate the cause
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Tiago Octaviano Primini |
Bug Description
Traceback (most recent call last):
File "/usr/bin/
**options)
File "/usr/lib/
loadapp(
File "/usr/lib/
return ctx.create()
File "/usr/lib/
return self.object_
File "/usr/lib/
app = filter(app)
File "/usr/lib/
return OioTempAuth(app, conf)
File "/usr/lib/
super(
File "/usr/lib/
account, username = conf_key.split('_', 1)[1].split('_')
ValueError: need more than 1 value to unpack
The above exception occurs, and crashes the process, when a parsed user "name" does not conform to the pattern [^:]+:[^:]+. This can be caused by a username in the conf file tempauth section not having a '_' to delimit account and user.
Instead, it would be better for it to return an explicit error. Compare with a missing key/password, which raises:
ValueError: user_test_tester3 has no key set
Changed in swift: | |
status: | Confirmed → In Progress |
If tempauth filter is configured with something like:
user_testtester = testing .admin
then the traceback occurs.
Note that the missing character is a '_', in this case the expected pattern is user_test_tester.
The bug is that the traceback could be replaced with a more informative error message.