Skip to content

release(rest): 260505#144

Merged
99mini merged 3 commits intomainfrom
rest/release/260505
May 5, 2026
Merged

release(rest): 260505#144
99mini merged 3 commits intomainfrom
rest/release/260505

Conversation

@99mini
Copy link
Copy Markdown
Owner

@99mini 99mini commented May 5, 2026

No description provided.

@99mini 99mini self-assigned this May 5, 2026
@99mini 99mini merged commit d9ca945 into main May 5, 2026
2 checks passed
@99mini 99mini deleted the rest/release/260505 branch May 5, 2026 06:40
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the build scripts in the admin frontend, configures the NestJS server to include Prisma-generated assets in the build output, and introduces validation decorators to the login DTO. Review feedback suggests explicitly adding the @isnotempty() decorator to both the email and password fields in the LoginDto to ensure that empty strings are not accepted during authentication, as @IsString and @isemail may not strictly enforce non-emptiness.

@@ -1,4 +1,9 @@
import { IsEmail, IsString } from 'class-validator';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The IsNotEmpty decorator should be imported from class-validator to be used for field validation in this DTO.

Suggested change
import { IsEmail, IsString } from 'class-validator';
import { IsEmail, IsNotEmpty, IsString } from 'class-validator';

import { IsEmail, IsString } from 'class-validator';

export class LoginDto {
@IsEmail()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It is recommended to explicitly add the @IsNotEmpty() decorator to the email field. While @IsEmail() typically fails on empty strings, being explicit ensures the field is required and maintains consistency with other validated fields.

Suggested change
@IsEmail()
@IsEmail()
@IsNotEmpty()

@IsEmail()
email: string;

@IsString()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The password field should include the @IsNotEmpty() decorator. The @IsString() decorator only validates the data type and will allow an empty string to pass, which is generally not acceptable for a password during login.

  @IsString()
  @IsNotEmpty()

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b418698e50

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

import { IsEmail, IsString } from 'class-validator';

export class LoginDto {
@IsEmail()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow non-TLD addresses in login validation

Using @IsEmail() with default options rejects addresses like admin@localhost, which were previously accepted and are still documented in the login API example. This change turns those existing credentials into a 400 validation error before authentication runs, so local/dev and any non-TLD email users can no longer log in unless require_tld: false (or equivalent) is configured.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant