fix(security): remediate audit vulnerabilities SEC-001 through SEC-023
Deploy Canina / deploy (push) Successful in 2m25s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 7s

This commit is contained in:
parsa committed 2026-09-23 23:00:25 +03:30
1 parent dc88677169
commit bd49fbc4a0
31 files changed
+867 -114

No files matched your search

+13
View File
@@ -24,6 +24,7 @@ import {
} from '@nestjs/swagger';
import { AdminLoginDto } from './dto/admin-login.dto';
import { RefreshTokenDto } from './dto/refresh-token.dto';
@ApiTags('Auth - احراز هویت')
@Controller('auth')
@@ -72,6 +73,7 @@ export class AuthController {
return this.authService.verifyOtp(verifyOtpDto);
}
@Throttle({ default: { limit: 5, ttl: 60000 } })
@Post('register')
@HttpCode(HttpStatus.CREATED)
@ApiOperation({ summary: 'ثبت‌نام با ایمیل/موبایل و رمز عبور' })
@@ -83,6 +85,7 @@ export class AuthController {
return this.authService.register(registerDto);
}
@Throttle({ default: { limit: 5, ttl: 60000 } })
@Post('login')
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: 'ورود با موبایل و رمز عبور' })
@@ -102,6 +105,16 @@ export class AuthController {
return this.authService.adminLogin(body);
}
@Throttle({ default: { limit: 10, ttl: 60000 } })
@Post('refresh-token')
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: 'دریافت جفت توکن جدید با استفاده از توکن تازه‌سازی' })
@ApiOkResponse({ description: 'توکن‌های جدید با موفقیت صادر شدند' })
@ApiBadRequestResponse({ description: 'توکن نامعتبر یا منقضی است' })
refreshToken(@Body() body: RefreshTokenDto) {
return this.authService.refreshToken(body.refreshToken);
}
@ApiBearerAuth()
@UseGuards(JwtAuthGuard)
@Post('refresh')