openid-certification / oidctest

THE CERTIFICATION TEST SUITE HAS BEEN MIGRATED TO A NEW SERVICE https://www.certificatinon.openid.net
Other
50 stars 15 forks source link

"IndexError: list index out of range" when c_hash is missing #124

Closed zandbelt closed 5 years ago

zandbelt commented 6 years ago

As reported on the list:

tests for the "code token id_token" and "code id_token" responses give an obscure error.

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/oidctest-0.7.3-py3.5.egg/oidctest/optt/__init__.py", line 288, in authz_post
    response=kwargs)
  File "/usr/local/lib/python3.5/dist-packages/otest-0.7.7-py3.5.egg/otest/aus/tool.py", line 231, in async_response
    return self.run_flow(self.sh["testid"], index=index)
  File "/usr/local/lib/python3.5/dist-packages/otest-0.7.7-py3.5.egg/otest/aus/tool.py", line 113, in run_flow
    _ver.test_sequence(self.conv.flow["assert"])
  File "/usr/local/lib/python3.5/dist-packages/otest-0.7.7-py3.5.egg/otest/verify.py", line 96, in test_sequence
    self.do_check(test)
  File "/usr/local/lib/python3.5/dist-packages/otest-0.7.7-py3.5.egg/otest/verify.py", line 70, in do_check
    stat = chk(self.conv)
  File "/usr/local/lib/python3.5/dist-packages/otest-0.7.7-py3.5.egg/otest/check.py", line 121, in __call__
    _stat = self._func(conv)
  File "/usr/local/lib/python3.5/dist-packages/oidctest-0.7.3-py3.5.egg/oidctest/op/check.py", line 1517, in _func
    idt = get_id_tokens(conv)[-1]
IndexError: list index out of range

It appears this error is generated when c_hash is missing from the id_token. This message should be improved.