paramiko.auth_handler.AuthHandler._handler_table[paramiko.common.MSG_SERVICE_ACCEPT] TypeError: 'property' object has no attribute '__getitem__'

Created on 8 Oct 2018  路  4Comments  路  Source: paramiko/paramiko

executed line:
paramiko.auth_handler.AuthHandler._handler_table[paramiko.common.MSG_SERVICE_ACCEPT]

error given:

TypeError: 'property' object has no attribute '__getitem__'

error occured when executing this openssh exploit script:
https://www.exploit-db.com/exploits/45233/

Most helpful comment

I think the update from issue #1283 lead to this issue, by replacing static dicts _handler_table with a dict-returning @property
Ref: https://github.com/paramiko/paramiko/blob/ae1cff0edc2522ba341506ab07ca2924bc346b4d/paramiko/auth_handler.py#L734-L740
So you can't call the _handler_table dict directly

The fastest solution for your testing is downgrade to older version, using pip

pip install paramiko==2.0.8

All 4 comments

I think the update from issue #1283 lead to this issue, by replacing static dicts _handler_table with a dict-returning @property
Ref: https://github.com/paramiko/paramiko/blob/ae1cff0edc2522ba341506ab07ca2924bc346b4d/paramiko/auth_handler.py#L734-L740
So you can't call the _handler_table dict directly

The fastest solution for your testing is downgrade to older version, using pip

pip install paramiko==2.0.8

Yes, thank you. However they mentioned in the issue that this fix is backwards compatible, yet it seems to cause trouble.

The fix is backwards compatible, but you are using an internal attribute of AuthHandler that is not part of the public interface.

The handler tables were separated for server and client code, so you'll have to use one of the two specific tables instead of the property.

For example, if you are running client code, you'd change _handler_table by _client_handler_table.

Alright, thank you very much!

Was this page helpful?
0 / 5 - 0 ratings