mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 11:52:20 -06:00
fix: It is now validated if the instance name contains uppercase and special characters
This commit is contained in:
@@ -42,6 +42,12 @@ export class InstanceController {
|
||||
}: InstanceDto) {
|
||||
this.logger.verbose('requested createInstance from ' + instanceName + ' instance');
|
||||
|
||||
if (instanceName !== instanceName.toLowerCase().replace(/[^a-z0-9]/g, '')) {
|
||||
throw new BadRequestException(
|
||||
'The instance name must be lowercase and without special characters',
|
||||
);
|
||||
}
|
||||
|
||||
const mode = this.configService.get<Auth>('AUTHENTICATION').INSTANCE.MODE;
|
||||
|
||||
if (mode === 'container') {
|
||||
|
||||
Reference in New Issue
Block a user