mireianievas / PySQM

Python client for the Sky Quality Meter
https://guaix.fis.ucm.es/splpr/SQM-REECL
GNU General Public License v3.0
4 stars 12 forks source link

"Save to data center" may be inadvertendly activated by running with Optimization #11

Closed jscheidtmann closed 2 years ago

jscheidtmann commented 2 years ago

The code calling the save_data_datacenter() uses an assertion to shield against sending data, if the feature is deactivated.

Like so:

            config._send_to_datacenter = False ### Not enabled by default
            try:
                assert(config._send_to_datacenter == True)
                assert(niter == 0)
                mydevice.save_data_datacenter("NEWFILE")
            except: pass

This means, the code IS run, when running with "python -O" according to python assert documentation.

This could create a GDPR risk for the server's operators for european users, as this leaks the observatory location - which very often may be the home address of the respective operators (One "not amused" user will be enough). To make matters worse data is sent in clear text over an unencrypted channel.