Comments (2)
Yeah this must be where tests are failing. Currently the library was only made to support 6 digit codes. However, your solution to not compare it as a string is wrong. The 0 lacking in the string is a major flaw and is potentially breaking tests, too. 012345 is different than 12345 so I am going to propose I remove the integer checks.
from cotp.
This issue is explained in #11 and will be referenced from thereof, as this is more or less a duplicate. There is also nothing wrong with calloc(8, ...) as its well defined, as the output is expected and handled. Although, theres issues with the source of it instead.
from cotp.
Related Issues (15)
- Add valid until function which returns a number that is guaranteed to work for until a time period
- totp_compares reads garbage from memory HOT 3
- SHA256 and SHA512 might be failing HOT 1
- We need a .gitignore
- We need to automate and implement (unit) testing via CI/CD HOT 1
- We need a makefile or cmake build script
- Make Linux compatible HOT 1
- R&D Time function for BASE32 Secret et. al
- Makefile needs an install target
- Base32 decoder is broken HOT 1
- Buffer or Stack overflow under 32bit HOT 1
- Doesn't use cryptographically safe random for time HOT 3
- Code Generator not 100% compatible HOT 13
- Verification bug: Signed integer is casted to unsigned
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cotp.