169 похожих чатов

Hi, can anyone help me to understand from which table

below query fetches information from. Query: select getpgusername(), current_database(), current_user, session_user, version(); how can we restrict the users from fetching these details. ?

2 ответов

12 просмотров

First of all, those are mostly FUNCTIONS. you can deny access to them. But be careful as some are declared by the SQL standard. And if your "user" is an ORM... It might use them. you can find functions in PSQL with: \df *.getpgusername the HINT that they are functions is the () but some do not require the () because of the screwy SQL standard. You can probably find the right ALTER statement to REMOVE EXECUTE on them for a specific user. BUT TREAD LIGHTLY. Disabling things like this CAN have TERRIBLE unintended consequences. And it is likely that you are only blocking one way to get to that information. It may also be exposed in the information_schema.* views or functions...

Rajini-J Автор вопроса

Похожие вопросы

Обсуждают сегодня

type TObj = object procedure Init; virtual; end; TObj1 = object(TObj) procedure Init; override; end; procedure TObj1.Init; begin inherited; end; procedur...
Alexander 👋
29
Есть какой-нибудь для Delphi/FPC T*Compression(Decompression)Stream на базе LZ4/Zstd/любой другой быстрый(и хорошо сжимающий) алгоритм А ещё лучше в pure pascal А ещё лучше од...
notme
45
А чем вам питонисты не угодили?😂
.
79
Можно ли загрузить скрипт py в бота чтобы он работал по нему? как это сделать?
huskadam #RCC Фанат? @hitlerpvp
13
А дин типизация это хорошо или плохо?
Alexey
12
Исходники плюс документация? Вы гоните)) демок хватит всем
zamtmn
11
Язык Си можно выучить за день? По книжке ANSI C на 230 страниц
Vincent Vegan
29
Hello. Could you please help me with finding all coordinates within a radius using a spatial index, given that I have a table with coordinates? SET @lng = 37.57925; SET @lat ...
Rinchin G
7
Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
76
а что есть "статистика" ? просто подсчет фактов обращения и времен выполнения ?
Сергей
9
Карта сайта