redis 4.5.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/redis/client.rb +10 -0
- data/lib/redis/connection/ruby.rb +6 -23
- data/lib/redis/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a7232fef186e6d6a11a90d8dd9aa7c71114f017e0afe9378999a96c9e6b4e05
|
4
|
+
data.tar.gz: 689f176b87909bf61eb60e57d1eb795198162a7e039104c80facf36880964bda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22b11dee92e298b46bb94a707156d3dbf9afb83c8e9e8cbf82cf366d582a7c1b7295d7f09a0fec01965245f4800c2482c0559d646f46ff1c6bba6423ab398ba9
|
7
|
+
data.tar.gz: 9a74ba29c8cb3d7634a44c78e30018a048e19cca66c7fad6a226722183f66546bebb370c92ecdf20522bb35ee72a09b2fda64891ff6d94db1702375bd1ba6b46
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Unreleased
|
2
2
|
|
3
|
+
# 4.5.1
|
4
|
+
|
5
|
+
* Restore the accidential auth behavior of redis-rb 4.3.0 with a warning. If provided with the `default` user's password, but a wrong username,
|
6
|
+
redis-rb will first try to connect as the provided user, but then will fallback to connect as the `default` user with the provided password.
|
7
|
+
This behavior is deprecated and will be removed in Redis 4.6.0. Fix #1038.
|
8
|
+
|
3
9
|
# 4.5.0
|
4
10
|
|
5
11
|
* Handle parts of the command using incompatible encodings. See #1037.
|
data/lib/redis/client.rb
CHANGED
@@ -122,6 +122,16 @@ class Redis
|
|
122
122
|
rescue CommandError => err # Likely on Redis < 6
|
123
123
|
if err.message.match?(/ERR wrong number of arguments for \'auth\' command/)
|
124
124
|
call [:auth, password]
|
125
|
+
elsif err.message.match?(/WRONGPASS invalid username-password pair/)
|
126
|
+
begin
|
127
|
+
call [:auth, password]
|
128
|
+
rescue CommandError
|
129
|
+
raise err
|
130
|
+
end
|
131
|
+
::Kernel.warn(
|
132
|
+
"[redis-rb] The Redis connection was configured with username #{username.inspect}, but" \
|
133
|
+
" the provided password was for the default user. This will start failing in redis-rb 4.6."
|
134
|
+
)
|
125
135
|
else
|
126
136
|
raise
|
127
137
|
end
|
@@ -21,7 +21,7 @@ class Redis
|
|
21
21
|
super(*args)
|
22
22
|
|
23
23
|
@timeout = @write_timeout = nil
|
24
|
-
@buffer = "".
|
24
|
+
@buffer = "".b
|
25
25
|
end
|
26
26
|
|
27
27
|
def timeout=(timeout)
|
@@ -32,30 +32,13 @@ class Redis
|
|
32
32
|
@write_timeout = (timeout if timeout && timeout > 0)
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
true # Ruby 2.4+
|
38
|
-
rescue ArgumentError
|
39
|
-
false # Ruby 2.3
|
40
|
-
end
|
41
|
-
|
42
|
-
if string_capacity_support
|
43
|
-
def read(nbytes)
|
44
|
-
result = @buffer.slice!(0, nbytes)
|
35
|
+
def read(nbytes)
|
36
|
+
result = @buffer.slice!(0, nbytes)
|
45
37
|
|
46
|
-
|
47
|
-
|
38
|
+
buffer = String.new(capacity: nbytes, encoding: Encoding::ASCII_8BIT)
|
39
|
+
result << _read_from_socket(nbytes - result.bytesize, buffer) while result.bytesize < nbytes
|
48
40
|
|
49
|
-
|
50
|
-
end
|
51
|
-
else
|
52
|
-
def read(nbytes)
|
53
|
-
result = @buffer.slice!(0, nbytes)
|
54
|
-
|
55
|
-
result << _read_from_socket(nbytes - result.bytesize, "".b) while result.bytesize < nbytes
|
56
|
-
|
57
|
-
result
|
58
|
-
end
|
41
|
+
result
|
59
42
|
end
|
60
43
|
|
61
44
|
def gets
|
data/lib/redis/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.5.
|
4
|
+
version: 4.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ezra Zygmuntowicz
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2021-10-
|
19
|
+
date: 2021-10-15 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: em-synchrony
|
@@ -102,9 +102,9 @@ licenses:
|
|
102
102
|
metadata:
|
103
103
|
bug_tracker_uri: https://github.com/redis/redis-rb/issues
|
104
104
|
changelog_uri: https://github.com/redis/redis-rb/blob/master/CHANGELOG.md
|
105
|
-
documentation_uri: https://www.rubydoc.info/gems/redis/4.5.
|
105
|
+
documentation_uri: https://www.rubydoc.info/gems/redis/4.5.1
|
106
106
|
homepage_uri: https://github.com/redis/redis-rb
|
107
|
-
source_code_uri: https://github.com/redis/redis-rb/tree/v4.5.
|
107
|
+
source_code_uri: https://github.com/redis/redis-rb/tree/v4.5.1
|
108
108
|
post_install_message:
|
109
109
|
rdoc_options: []
|
110
110
|
require_paths:
|