-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HOTP, default name for otp_counter yield "stack level too deep" #32
Comments
I forget to add my Rails is 4.2. |
+1 |
1 similar comment
+1 |
It looks like this is actually fixed on the master branch, but the latest version on RubyGems does not include the change. Any news on a future release with this fix? |
This is still an issue. Is there a library that is being maintained that should be used instead of this one for one time passwords? |
A similar thing will also happen if the otp secret column name is In the RubyGems repo: def otp_column
self.send(self.class.otp_column_name)
end
def otp_column=(attr)
self.send("#{self.class.otp_column_name}=", attr)
end and in def otp_column
self.public_send(self.class.otp_column_name)
end
def otp_column=(attr)
self.public_send("#{self.class.otp_column_name}=", attr)
end In both cases, |
+1 |
@robertomiranda, This is a pretty severe bug, could you release a new version with the fix that is already on master? Is there a particular reason why you haven't done so, if you need help with anything I am happy to chip in :) |
Hey guys! After upgrading to gem in v2.1.1 version, this issue still occurs? 🤝 |
For a while, we will close it. Anyway, if necessary, we can reopen later |
I have pretty simple user model with
otp_counter:integer
as provided in help:If I try to create user I catch an error:
The problem is obviously in that lines:
Which basically call otp_counter method recursively again and again. Probably solution is to rename
otp_counter
method to something like__otp_counter
.Workaround is to rename otp_counter column to something else (both in migration and in model):
The text was updated successfully, but these errors were encountered: