CDB_Username: Set secure search_path

This commit is contained in:
Raul Marin 2019-10-03 16:54:55 +02:00
parent 0898881470
commit 186ee37a57

View File

@ -2,5 +2,9 @@
CREATE OR REPLACE FUNCTION @extschema@.CDB_Username() CREATE OR REPLACE FUNCTION @extschema@.CDB_Username()
RETURNS text RETURNS text
AS $$ AS $$
SELECT @extschema@.CDB_Conf_GetConf(CONCAT('api_keys_', session_user))->>'username'; SELECT @extschema@.CDB_Conf_GetConf(concat('api_keys_', session_user))->>'username';
$$ LANGUAGE SQL STABLE PARALLEL SAFE SECURITY DEFINER; $$ LANGUAGE SQL
STABLE
PARALLEL SAFE
SECURITY DEFINER
SET search_path = @extschema@, pg_temp;