Skip to content

Security: IP address stored as integer instead of text#387

Open
tuanaiseo wants to merge 1 commit into
maillab:mainfrom
tuanaiseo:contribai/fix/security/ip-address-stored-as-integer-instead-of-
Open

Security: IP address stored as integer instead of text#387
tuanaiseo wants to merge 1 commit into
maillab:mainfrom
tuanaiseo:contribai/fix/security/ip-address-stored-as-integer-instead-of-

Conversation

@tuanaiseo
Copy link
Copy Markdown

Problem

In mail-worker/src/entity/verify-record.js, the ip field is defined as integer('ip') but IP addresses are strings. This will cause data loss or conversion errors when storing IPv4 or IPv6 addresses.

Severity: high
File: mail-worker/src/entity/verify-record.js

Solution

Change ip: integer('ip') to ip: text('ip') to properly store IP addresses

Changes

  • mail-worker/src/entity/verify-record.js (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

In mail-worker/src/entity/verify-record.js, the ip field is defined as integer('ip') but IP addresses are strings. This will cause data loss or conversion errors when storing IPv4 or IPv6 addresses.

Affected files: verify-record.js

Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
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