jkudish / JigoShop-Software-Add-on

Add functionality to the JigoShop WordPress plugin, which allows you to run a full-blown software shop, including license activation, license retrieval, activation e-mails and more
https://github.com/jkudish/JigoShop-Software-Add-on
19 stars 2 forks source link

After Reset, Activations with instanceid should deactivate #7

Closed johnwu closed 13 years ago

johnwu commented 13 years ago

I have a computer A which I activated. On computer B, I reset the activations, which should deactivate all existing instances.

So I restart the application on computer A, which makes the request:

POST /store/api?request=activation HTTP/1.1

licensekey=2f7bbdc4%2Dec53%2D4386%2D902f%2D0eb92e197014&email=john%40johnwu%2Ecom&os=Mac%20OS%2010%2E6%2E8&request=activation&version=1%2E0%2E0&instanceid=14e4a28e%2Dc400%2D4624%2Db2f4%2Dee764da87dae&productid=TESTER

The response should be not activated, but instead it looks like it is still activated with the response:

{"activated":true,"instanceid":"14e4a28e-c400-4624-b2f4-ee764da87dae","message":"4 out of 5 activations remaining","sig":"f93cbb4f40c5f743d6ff9b512436032f"}

Looking in the admin interface, the instance is deactivated.

jkudish commented 13 years ago

Good catch with this bug!

Had a = instead of == in the code, which was always returning true :)

Try again now that I've fixed this