owncloud / twofactor_totp

🔑 Second factor TOTP (Google Authenticator) provider for ownCloud
GNU Affero General Public License v3.0
9 stars 9 forks source link

Fix casting problem #182

Closed karakayasemi closed 4 years ago

karakayasemi commented 4 years ago

Fixes #170 When the key starts with '0', typecasting to int operation loses that leading '0'. This problem has been fixed by removing the cast operation.

This situation discovered with random CI failures and we have added some retry scenarios. Since these scenarios no longer needed, the related commit has been reverted.

codecov[bot] commented 4 years ago

Codecov Report

Merging #182 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #182   +/-   ##
=========================================
  Coverage     68.10%   68.10%           
  Complexity       67       67           
=========================================
  Files            14       14           
  Lines           279      279           
=========================================
  Hits            190      190           
  Misses           89       89           
Impacted Files Coverage Δ Complexity Δ
lib/Service/Totp.php 33.33% <100.00%> (ø) 14.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5aa4b54...a0ed8ed. Read the comment docs.

phil-davis commented 4 years ago

Great stuff! Discovered a problem that really was intermittent (I guess maybe 1 in 10).

It is good that the test PR that provided a "sometimes" workaround is reverted. I raised issue #183 to put back some of the useful code from that PR #172 without putting back the retry code.