Ctrlpanel-gg / panel

CtrlPanel offers an easy-to-use and free billing solution for all starting and experienced hosting providers that seamlessly integrates with the Pterodactyl panel.
https://ctrlpanel.gg/
GNU Affero General Public License v3.0
424 stars 146 forks source link

[Bug]: Added users to Pterodactyl then cannot create an account on controlpanel. #977

Open SneakyHub opened 5 months ago

SneakyHub commented 5 months ago

What is your request about?

When you create an account on controlpanel, it will create an account in both databases Pterodactyl and Controlpanel. That's all good but if a previous user who created an account on the controlpanel, then goes ahead creates a server then invites their friend or whoever via the users tab in pterodactyl it will then create a user with their email/username within the pterodactyl database. The issue here is if that friend or whoever was to create their own controlpanel account it will say the user already exists in the database even though it doesn't exist in the controlpanel database, it exists in the pterodactyl database. Therefore making it impossible for a user to then use that email for their own personal controlpanel account.

Branch

main

Solution idea

Have a better way to sync pterodactyl users to the controlpanel. Either have a cron that syncs the data between the two databases properly or have a way for that user to sync their pterodactyl account to a dashboard account or have it so when a new user is added to pterodactyl it then uses those same details in the controlpanel database. It can automatically sync once the new user has been added to pterodactyls database so perhaps making it check for new users, or however you would like to go about it.

Ctrlpanel Logs

no logs. just a simple friendly error code. user already exists.

Additional Info

Latest version of controlpanel and pterodactyl as of 22/08/2024. (no modified code, no themes, no addons, pterodactyl and controlpanel are stock) This issue affects all controlpanel versions.

SneakyHub commented 5 months ago

This was posted a week ago and has no response. Is there any update with this? Any progress? Or at least can you confirm this is an issue. Again it's been a week since I've posted this and I haven't heard anything. Can you give me an update please. Thanks.

S0ly commented 5 months ago

Hi,

I tagged this issue as high priority, but it could potentially be a medium priority – I'm not entirely sure.

As you know, this is an open source project, and we're all volunteers doing our best. Currently, this issue isn't at the top of our priority list, and it hasn't been fully confirmed or reviewed yet.

Our focus right now is on resolving other "blocking" issues to get version 0.10 released. Wen we can, we'll review this issue and decide whether to add it to our to-do list.

In the meantime, you're welcome to submit a pull request to fix the issue if you'd like!

1day2die commented 5 months ago

its an issue that could be regarded before the release of 0.10 eventhough i would label it as medium priority as this is kinda an edge case

lezetho commented 1 month ago

This could work, we would just have to adjust the cronjob to also sync to Pterodactyl. However the main issue is how the passwords would sync between platforms (haven't fully taken a look yet so I'm unsure if it's possible or not)

1day2die commented 2 weeks ago

This could work, we would just have to adjust the cronjob to also sync to Pterodactyl. However the main issue is how the passwords would sync between platforms (haven't fully taken a look yet so I'm unsure if it's possible or not)

both systems use the same hashing method, theoretically, you can just send the hashed password from ctrlpanel to ptero via the API. this is also done during the installation process