mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
fix: It is now validated if the instance name contains uppercase and special characters
This commit is contained in:
parent
897f8164b9
commit
d7f264c1c2
@ -6,6 +6,7 @@
|
|||||||
* Correction in the use of the api with mongodb
|
* Correction in the use of the api with mongodb
|
||||||
* Adjustments to search endpoint for contacts, chats, messages and Status messages
|
* Adjustments to search endpoint for contacts, chats, messages and Status messages
|
||||||
* Now when deleting the instance, the data referring to it in mongodb is also deleted
|
* Now when deleting the instance, the data referring to it in mongodb is also deleted
|
||||||
|
* It is now validated if the instance name contains uppercase and special characters
|
||||||
|
|
||||||
# 1.3.1 (2023-07-20 07:48)
|
# 1.3.1 (2023-07-20 07:48)
|
||||||
|
|
||||||
|
@ -42,6 +42,12 @@ export class InstanceController {
|
|||||||
}: InstanceDto) {
|
}: InstanceDto) {
|
||||||
this.logger.verbose('requested createInstance from ' + instanceName + ' instance');
|
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;
|
const mode = this.configService.get<Auth>('AUTHENTICATION').INSTANCE.MODE;
|
||||||
|
|
||||||
if (mode === 'container') {
|
if (mode === 'container') {
|
||||||
|
@ -1412,8 +1412,6 @@ export class WAStartupService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Number(countryCode) === 52 || Number(countryCode) === 54) {
|
if (Number(countryCode) === 52 || Number(countryCode) === 54) {
|
||||||
console.log('numero mexicano');
|
|
||||||
|
|
||||||
const formattedMXARNumber = this.formatMXOrARNumber(number);
|
const formattedMXARNumber = this.formatMXOrARNumber(number);
|
||||||
|
|
||||||
if (formattedMXARNumber !== number) {
|
if (formattedMXARNumber !== number) {
|
||||||
|
Loading…
Reference in New Issue
Block a user