Rails8/ Routes#2
Open
olvado wants to merge 3 commits into
Open
Conversation
…stamp ROTP >= 3 returns TOTP#verify as an Integer Unix epoch (timecode * interval) rather than a boolean. authenticate_totp assigned that raw Integer straight to totp_timestamp. When the consuming app backs totp_timestamp with a datetime column, ActiveModel 8.1 passes the Integer through unchanged and Postgres raises PG::DatetimeFieldOverflow on save. Wrap the epoch in Time.at(...).utc before assignment. Replay protection is preserved: ROTP calls #to_i on the value read back from the column, which yields the same epoch for a Time/TimeWithZone. confirm_totp_secret funnels through authenticate_totp, so it is covered by the same change.
Rails 8 no longer bundles Sprockets, so requiring sprockets/railtie (and the config.assets.* settings that depend on it) aborted environment boot. Drop them from the dummy app; these specs do not exercise the asset pipeline. Zeitwerk also expects lib/sms_provider.rb to define SmsProvider, but the file and its references use SMSProvider, so autoloading raised NameError in the global before(:each) hook. Register SMS as an inflection acronym.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chore(routes): remove :resend_code from only args for Rails 8 compatibility