Skip to content

VerifyEmail and VerifyOTP bypass revoked user access check #480

@lakhansamani

Description

@lakhansamani

Bug Description

In internal/graphql/verify_email.go and internal/graphql/verify_otp.go, there is no check for user.RevokedTimestamp. The Login method correctly checks user.RevokedTimestamp != nil and returns an error, but these verification flows skip this check entirely.

Impact

HIGH — A user whose access was revoked can still verify email/OTP and obtain valid authentication tokens, bypassing the revocation.

Fix

Add if user.RevokedTimestamp != nil { return error } check after fetching user in both files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions