Jump to content

Vesta usernames are easily duplicated (and then service creation fails)


Victor van Herpt

Recommended Posts

Blesta's VestaCP plugin uses the provided domain name to generate a username in the VestaCP installation. When 2 domains have the same 8 first characters, Vesta will throw an error and Blesta will fail (message is in the module logs).

Say we have 2 domains from our clients, one is duplicate.com and another is duplicating.com. When adding the services in Blesta, the VestaCP module will try to create a new user account via Vesta's api, using the first 8 characters of the domain name, in this example it would fail, as the resulting username for both domains is "duplicat".

Ideally, Blesta would automatically manage those exceptions and create a proper username, for instance, adding a suffix to it, in this case it could be "duplica1". Also, either a random username could be created, or use other client data for the name generation.

An error message appears upon trying to create the servide, saying "An internal error occurred, or the server did not respond to the request.". The error provided in the logs would be:

vestacpinstall.com|v-add-user
a:2:{s:6:"status";s:5:"false";s:8:"response";s:28:"Error: user duplicat exists
";}

 

Captura de pantalla 2019-07-13 a las 11.53.30.png

Captura de pantalla 2019-07-13 a las 11.54.57.png

Link to comment
Share on other sites

  • Tyson locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...