Skip to content

fix: use UTC calendar for JDBC timestamp reads#843

Open
Gautam-aman wants to merge 1 commit into
OWASP:devfrom
Gautam-aman:fix/timezone-auth-bypass
Open

fix: use UTC calendar for JDBC timestamp reads#843
Gautam-aman wants to merge 1 commit into
OWASP:devfrom
Gautam-aman:fix/timezone-auth-bypass

Conversation

@Gautam-aman
Copy link
Copy Markdown

Fixes timezone-dependent authentication bypass caused by JDBC getTimestamp() interpreting SQL DATETIME values using the JVM default timezone.

On non-UTC JVM deployments, suspended users could authenticate because suspendedUntil timestamps were interpreted incorrectly and compared against the wrong epoch time.

This PR standardizes JDBC timestamp reads using a shared UTC Calendar.

Changes:
Added shared UTC JDBC calendar utility

Suspended users are now correctly rejected during authentication regardless of JVM timezone.

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant