You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Web login: isPasswordMd5 semantics are inverted (plaintext sent, rejected with SERVER_STATUS=16) #143
Library version: 0.10.0 (also present in 0.9.3, and unchanged by the recently merged #142) Connection type:CONNECT_WEB
Summary
For the web connection, the isPasswordMd5 flag behaves opposite to its
documented meaning. To make the library send the md5 digest that the E3DC portal
expects, you have to call it with isPasswordMd5=Trueand pass the plaintext
password. Calling it the documented way — isPasswordMd5=False with a
plaintext password — sends the plaintext to the server, which now rejects it.
The docstring says:
isPasswordMd5 (bool): indicates whether the password is already md5 digest
So isPasswordMd5=False should mean "this is plaintext, please hash it" — but
that path sends it unhashed.
Because E3DC_RSCP_web is constructed with its default isPasswordMd5=True, it
sends self.password without hashing. So:
Call
Password sent
Portal result
isPasswordMd5=False + plaintext
plaintext
rejected, SERVER_STATUS=16
isPasswordMd5=True + plaintext
md5(plaintext)
accepted
isPasswordMd5=True + md5 digest
md5(md5)
rejected
isPasswordMd5=False + md5 digest
md5 digest
accepted
The two "accepted" rows are the opposite of what the flag names imply.
Reproduction
With valid portal credentials on CONNECT_WEB:
# Fails now — plaintext is sent, server returns SERVER_STATUS=16, virtConId=-1E3DC(E3DC.CONNECT_WEB, username=..., password="<plaintext>",
serialNumber=..., isPasswordMd5=False)
# Works — the same plaintext, but this branch hashes it before sendingE3DC(E3DC.CONNECT_WEB, username=..., password="<plaintext>",
serialNumber=..., isPasswordMd5=True)
I confirmed at the RSCP level that the first sends SERVER_PASSWD as the raw
password and the server answers the virtual-connection request with SERVER_CONNECTION_ID = -1 and SERVER_STATUS = 16; the second sends the md5
digest and authenticates. (The portal appears to have tightened this: a
plaintext password used to be accepted, which is likely why this went unnoticed.)
Impact / note on fixing
This is awkward to "just fix", because users who currently pass isPasswordMd5=True with a plaintext password (the working combination above)
rely on the current behaviour — flipping the condition to match the docs would
break them. Options I can see:
Make the flag accurate (hash when isPasswordMd5=False, pass through when True) and treat it as a breaking change / major bump, ideally by passing isPasswordMd5 through to E3DC_RSCP_web and letting it do the single hash.
Keep the behaviour but document the quirk clearly for CONNECT_WEB.
Happy to open a PR for whichever direction you prefer.
Activity