emqx-auth-redis icon indicating copy to clipboard operation
emqx-auth-redis copied to clipboard

Using EVAL as auth.redis.auth_cmd

Open Think7 opened this issue 7 years ago • 1 comments

When attempting to use the following command as the auth.redis.auth_cmd parameter it is not sent to redis correctly.

EVAL "return redis.call('HGET','App:Auth:Users:test','pass')" 0

The command is actually sent to redis as: "EVAL" "\"return" "redis.call('HGET','App:Auth:Users:test','pass')\"" "0"

I'm guessing line 43 here is the issue: https://github.com/emqtt/emq-auth-redis/blob/master/src/emq_auth_redis_cli.erl

Could an option be added where the command is sent verbatim except for the %u and %c substitutions?

Think7 avatar Dec 10 '17 16:12 Think7

Hi, @Think7 Sorry for the late reply,Do you resolve this problem?

turtleDeng avatar Dec 31 '19 09:12 turtleDeng