[PR #73] [MERGED] fix null timestamp issue in verifyKeyNewer #610

Closed
opened 2026-03-14 12:15:44 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/antonioribeiro/google2fa/pull/73
Author: @SebastianS90
Created: 6/22/2017
Status: Merged
Merged: 6/22/2017
Merged by: @antonioribeiro

Base: masterHead: fix-timestamp-issue


📝 Commits (1)

  • 1ce103e fix null timestamp issue in verifyKeyNewer

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 src/Google2FA.php (+3 -1)

📄 Description

When using verifyKeyNewer then $oldTimestamp is given here.
This means that the ternary operator (? :) goes to the else-part and skips the then-part. But then the timestamp normalization ($timestamp = $this->makeTimestamp($timestamp)) is not applied, thus calling $this->findValidOTP with null.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/antonioribeiro/google2fa/pull/73 **Author:** [@SebastianS90](https://github.com/SebastianS90) **Created:** 6/22/2017 **Status:** ✅ Merged **Merged:** 6/22/2017 **Merged by:** [@antonioribeiro](https://github.com/antonioribeiro) **Base:** `master` ← **Head:** `fix-timestamp-issue` --- ### 📝 Commits (1) - [`1ce103e`](https://github.com/antonioribeiro/google2fa/commit/1ce103e42170e86910af23e3529e76bdeb59f5a8) fix null timestamp issue in verifyKeyNewer ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/Google2FA.php` (+3 -1) </details> ### 📄 Description When using `verifyKeyNewer` then `$oldTimestamp` is given here. This means that the ternary operator (`? :`) goes to the else-part and skips the then-part. But then the timestamp normalization (`$timestamp = $this->makeTimestamp($timestamp)`) is not applied, thus calling `$this->findValidOTP` with `null`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 12:15:44 +03:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/google2fa#610
No description provided.