blesta / module-pterodactyl

Blesta API integration with Pterodactyl
MIT License
12 stars 7 forks source link

potential logic error in checking if user exists in pterodactyl when making a new service #76

Open Aaronstar-McClure opened 1 year ago

Aaronstar-McClure commented 1 year ago

(from my understanding)

line 264 in pterodactyl.php only triggers if a pterodactyl user account is not found with a matching email.

this causes later issues if the user was previously created by pterodactyl and not blesta, because blesta does not verify that external user id is not null when later querying it.

when confirming if a user email already exists in pterodactyl, the plugin should also ensure the external user id has been set at some point so that the user is properly referenced in the future

unless im misreading stuff. i hope im makeing sense explaining this. i can try explaining in more detail if you want

Aaronstar-McClure commented 1 year ago

![1](https://user-images.githubusercontent.com/24755349/198861803-1fd8b3ca-1ced-4614-8853-1eb41c497927.png) ![2](https://user-images.githubusercontent.com/24755349/198861806-04fed9b9-5d54-4f9e-ac73-e579378af363.png) ![3](https://user-images.githubusercontent.com/24755349/198861810-c94fab59-6097-4a4c-b52f-f7e8d2f4caab.png)

(codeblocked to not auto embed. didnt feel polite to fill up the page with big pictures)