Skip to content

Commit

Permalink
bypass auth for queries done insideconsumers
Browse files Browse the repository at this point in the history
Signed-off-by: mohitkhullar <[email protected]>
  • Loading branch information
mohitkhullar committed Dec 19, 2024
1 parent fcd0928 commit b1c9b24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/sp.c
Original file line number Diff line number Diff line change
Expand Up @@ -7176,6 +7176,9 @@ static int exec_procedure_int(struct sqlthdstate *thd,

if (IS_SYS(spname)) init_sys_funcs(L);

if (trigger || consumer)
clnt->current_user.bypass_auth = 1;

if (gbl_is_physical_replicant && consumer) {
rc = -3;
(*err) = strdup("Cannot execute consumer on physical-replicant");
Expand Down Expand Up @@ -7327,7 +7330,6 @@ void *exec_trigger(char *spname)
clnt.dbtran.mode = TRANLEVEL_SOSQL;
clnt.sql = sql;
clnt.dbtran.trans_has_sp = 1;
clnt.current_user.bypass_auth = 1;

thread_memcreate(128 * 1024);
struct sqlthdstate thd = {0};
Expand Down

0 comments on commit b1c9b24

Please sign in to comment.