Skip to content

Commit 07b6dd3

Browse files
committed
♻️ Assign ScramAuthenticator ivars in initialize
1 parent 36ecc26 commit 07b6dd3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/net/imap/sasl/scram_authenticator.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ def initialize(username_arg = nil, password_arg = nil,
9595
raise ArgumentError, "min_iterations must be positive"
9696

9797
@cnonce = cnonce || SecureRandom.base64(32)
98+
99+
# These attrs are set from the server challenges
100+
@server_first_message = @snonce = @salt = @iterations = nil
101+
@server_error = nil
102+
103+
# These values are created and cached in response to server challenges
104+
@client_first_message_bare = nil
105+
@client_final_message_without_proof = nil
98106
end
99107

100108
# Authentication identity: the identity that matches the #password.

0 commit comments

Comments
 (0)