1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-08 05:01:52 +03:00

278 Commits

Author SHA1 Message Date
Nedyalko Dyakov
8f05aef18e
Merge branch 'master' into ndyakov/token-based-auth 2025-05-12 19:08:57 +03:00
Nedyalko Dyakov
d54e848055
feat(options): panic when options are nil (#3363)
Client creation should panic when options are nil.
2025-04-30 09:33:40 +03:00
Nedyalko Dyakov
2a97f2e49c
fix build 2025-04-22 22:42:18 +03:00
Nedyalko Dyakov
5fac913204
wip, hooks refactor 2025-04-22 21:11:23 +03:00
Nedyalko Dyakov
44628c5dbd
add tests 2025-04-22 15:41:35 +03:00
Nedyalko Dyakov
40a89c56cc
Initial re authentication implementation
Introduces the StreamingCredentialsProvider as the CredentialsProvider
with the highest priority.

TODO: needs to be tested
2025-04-15 13:32:33 +03:00
Nedyalko Dyakov
df9bfce954
update documentation 2025-03-24 16:29:15 +02:00
Nedyalko Dyakov
9ef438bd15
Merge remote-tracking branch 'origin/master' into ndyakov/token-based-auth 2025-03-24 16:11:53 +02:00
Nedyalko Dyakov
d236865b0c
fix: handle network error on SETINFO (#3295) (CVE-2025-29923)
* fix: handle network error on SETINFO

This fix addresses potential out of order responses as described in `CVE-2025-29923`

* fix: deprecate DisableIndentity and introduce DisableIdentity

Both options will work before V10. In v10 DisableIndentity will be dropped. The preferred flag to use is `DisableIdentity`.
2025-03-19 19:02:36 +02:00
Nedyalko Dyakov
5410adb9dc
wip 2025-03-18 11:07:14 +02:00
LINKIWI
1c9309fdc2
Set client name in HELLO RESP handshake (#3294) 2025-03-13 14:55:28 +02:00
LINKIWI
9db1286414
Reinstate read-only lock on hooks access in dialHook (#3225) 2025-02-11 17:50:31 +02:00
LINKIWI
080e051124
Eliminate redundant dial mutex causing unbounded connection queue contention (#3088)
* Eliminate redundant dial mutex causing unbounded connection queue contention

* Dialer connection timeouts unit test

---------

Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
2024-11-20 13:38:06 +02:00
ofekshenawa
04005cbdc7
Support Resp 3 Redis Search Unstable Mode (#3098)
* Updated module version that points to retracted package version (#3074)

* Updated module version that points to retracted package version

* Updated testing image to latest

* support raw parsing for problematic Redis Search types

* Add UnstableResp3SearchModule to client options

* Add tests for Resp3 Search unstable mode

* Add tests for Resp3 Search unstable mode

* Add readme note

* Add words to spellcheck

* Add UnstableResp3SearchModule check to assertStableCommand

* Fix assertStableCommand logic

* remove go.mod changes

* Check panic occur on tests

* rename method

* update errors

* Rename flag to UnstableResp3

---------

Co-authored-by: Vladyslav Vildanov <117659936+vladvildanov@users.noreply.github.com>
Co-authored-by: vladvildanov <divinez122@outlook.com>
2024-09-12 11:26:10 +03:00
Monkey
2d8fa02ac2
fix: fix #2681 (#2998)
Signed-off-by: monkey92t <golang@88.com>
2024-05-29 10:55:28 +08:00
ofekshenawa
5da49b1aba
bug: Fix SETINFO ensuring it is set-and-forget (#2915)
* Exexcute set-info without validation

* Fix tests

* Remove spaces from runtime.Version

* fix typo

* Send setinfo after auth

* Add pipline

* fix golangci

* revert fixing typo

* support sentinel
2024-02-20 17:34:35 +02:00
ofekshenawa
35de49a8da
Speed up connections by sending SetInfo via a pipeline (#2880)
* Send Client SetInfo via pipe

* Fix ACL test

* Add client set info to acl command rules
2024-02-15 12:48:56 +02:00
Tiago Peczenyj
21ed15bbed
Add helpers to set libinfo without panic (#2724)
* add helpers to set library name and library info without risk of panic if we try to set both

* refactor code to use helpers

* add example

* refactor tests

* fix testable example

* simplify example

* rename exampl

* fix ring.go

* update example

---------

Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
2024-02-14 22:40:20 +02:00
ofekshenawa
a32be3d93d
Add Suffix support to default client set info (#2852)
* Add Suffix support to defualt client set info

* Change ClientNameSuffix to IdentitySuffix

* add tests
2024-01-04 14:40:14 +02:00
RyoMiyashita
a109302230
fix: #2730 data race at hooksMixin (#2814) 2023-12-10 12:04:13 +02:00
ofekshenawa
0b6be62b71
Identify client on connect (#2708)
* Update CLIENT-SETINFO to support suffixes

* Update CLIENT-SETINFO

* fix acl log test

* add setinfo option to cluster

* change to DisableIndentity

* change to DisableIndentity
2023-09-20 10:33:09 +03:00
ljun20160606
391798880c
feat: add protocol option (#2598) 2023-05-16 22:02:22 +08:00
Monkey
7b4f2179cb
feat: no longer verify HELLO error messages (#2515)
Signed-off-by: monkey92t <golang@88.com>
2023-04-12 20:35:32 +08:00
Euclid
30a6f7107e
fixed #2462 v9 continue support dragonfly, it's Hello command return "NOAUTH Authentication required" error (#2479)
* fixed #2462 error NOAUTH and support dragonfly

* check add comment

* alignment

---------

Co-authored-by: Monkey <golang@88.com>
2023-03-10 21:21:24 +08:00
monkey92t
21e1954745 fix(conn): releaseConn should be executed correctly
Signed-off-by: monkey92t <golang@88.com>
2023-01-28 15:44:06 +08:00
Vladimir Mihailenco
97b491aace chore: update import path 2023-01-23 08:48:54 +02:00
Vladimir Mihailenco
767109c632 chore: cleanup names 2023-01-21 10:30:02 +02:00
monkey
a5aeb1659b docs: update hook doc
Signed-off-by: monkey <golang@88.com>
2023-01-21 00:20:50 +08:00
monkey
0ed4a4420f fix: fix the withHook func
Signed-off-by: monkey <golang@88.com>
2023-01-21 00:02:44 +08:00
monkey
97697f488f feat: hook mode is changed to FIFO
Signed-off-by: monkey <golang@88.com>
2023-01-20 23:19:49 +08:00
monkey92t
d42dd1007c docs: add a description of the hook
Signed-off-by: monkey92t <golang@88.com>
2023-01-07 16:30:56 +08:00
Monkey
c7bc54b4d0
Merge pull request #2333 from monkey92t/fix_2312
feat: add ClientName option
2022-12-28 22:31:25 +08:00
monkey92t
a872c35b1a feat: add ClientName option
Signed-off-by: monkey92t <golang@88.com>
2022-12-28 22:14:52 +08:00
Monkey
a4336cbd43
feat(scan): add Scanner interface (#2317)
Signed-off-by: monkey92t <golang@88.com>
2022-12-24 22:29:45 +08:00
Vladimir Mihailenco
5053db2f9c fix: wrap cmds in Conn.TxPipeline 2022-11-22 14:30:27 +02:00
Dom Parfitt
d1bfaba549 fix: capture error correctly in withConn 2022-11-02 09:11:36 +00:00
Vladimir Mihailenco
2ec03d9b37 fix: late binding for dial hook 2022-10-12 15:00:06 +03:00
Vladimir Mihailenco
0dff3d1461 feat: add OpenTelemetry metrics instrumentation 2022-10-12 11:09:41 +03:00
Vladimir Mihailenco
58f7149e38 feat: add ContextTimeoutEnabled to respect context timeouts and deadlines 2022-10-11 10:22:42 +03:00
Vladimir Mihailenco
4bb485d044 fix: retry dial errors from pipelines 2022-10-11 09:38:10 +03:00
Vladimir Mihailenco
dd9a200427
fix: improve pipelines retry logic (#2232)
* fix: improve pipelines retry logic
2022-10-06 14:05:55 +03:00
Vladimir Mihailenco
b0231c659e chore: always retry write timeouts 2022-10-06 10:06:02 +03:00
Vladimir Mihailenco
6725851465
Merge pull request #2071 from ray2011/master
fix retryTimeout in baseClient _process
2022-10-06 10:05:25 +03:00
jianghang
baa48a4415 feat(pubsub): support sharded pub/sub 2022-08-04 00:05:22 +08:00
Knut Zuidema
e061db8c13
refactor: remove unused context attributes (#2154)
* refactor: remove unused context field
2022-07-14 13:43:42 +03:00
Knut Zuidema
092a692384
refactor: remove unused context attribute from conn (#2150) 2022-07-13 08:49:28 +03:00
Back Yu
b6d2a92529
fix: #2114 for redis-server not support Hello
Using `strings.HasPrefix` instead of `equal`
2022-06-10 21:19:02 +08:00
Vladimir Mihailenco
4ddd7d1803 chore: remove WithContext 2022-06-05 09:58:05 +03:00
Vladimir Mihailenco
a18fad5bd3 chore: v9 2022-06-04 17:42:06 +03:00
Vladimir Mihailenco
d09c27e604 feat: upgrade to Redis 7 2022-06-04 17:25:12 +03:00