dh1tw / pyhamtools

A Library with Amateur Radio specific Functions and Methods
MIT License
89 stars 25 forks source link

Deserializing json lookup data stored in redis breaks due to bad escaping #16

Closed dh1tw closed 4 years ago

dh1tw commented 4 years ago

Lookup data (e.g. the clublog XML definitions) can be stored in Redis for better concurrent access amongst several applications on the server. The data is stored in the JSON format in Redis. On access, the data is retrieved and converted back from JSON into a native Python object.

This works actually well, as long as the serialized data does not contain an apostrophe (inverted comma) or a quotation mark. I found recently this problem while going through the logs of DXHeat. The country name Cote d'Ivoire (Ivery Coast) (ADIF ID 428) caused pyhamtools to through an execption whenever the corresponding country information was read from redis.

dh1tw commented 4 years ago

fixed in version v0.7.3 v0.7.5

df7cb commented 4 years ago

(Fwiw, if that was supposed to be "fixed in v0.7.5", I can't see that yet.)

dh1tw commented 4 years ago

well observed @df7cb :-) Now version v0.7.5 is also published on pypi

df7cb commented 4 years ago

Thanks! ... and Debian package updated. (I was looking at github, though.)