vheon / JediHTTP

Simple http wrapper around jedi
Apache License 2.0
40 stars 9 forks source link

JediHTTP never calls `b64decode` on the hmac_secret it receives #11

Closed Valloric closed 8 years ago

Valloric commented 8 years ago

As part of updating ycmd to be Python 3 compatible, I'm auditing how we handle strings vs. bytes everywhere. I noticed that while JediHTTP seems to need the hmac_secret it receives on startup to be base64 encoded (since it can't be raw bytes because of JSON), it never decodes the secret. This places an artificial limit on what the secret can be, because it must be ASCII data.

The JediHTTP client in ycmd works because it makes the same assumption.

Anyway, not at all urgent, just something you may want to fix. Probably not before ycmd starts supporting Python3 though because I'd have to change stuff yet again. :)

vheon commented 8 years ago

Oh, thanks for pointing that out. I've never implemented HMAC so I have to admit I didn't exactly know what I was doing :sob: As soon as we push the Python3 porting into main ycmd I will fix this.

Valloric commented 8 years ago

Don't feel bad, it's not really a major issue. Also, racerd had the exact same problem. :) So it's a frequent mistake.