mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Prevent dictionary ACL bypass via dictionary table function
This commit is contained in:
parent
beb0f6c5c1
commit
223db31cb6
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include <Parsers/ASTLiteral.h>
|
#include <Parsers/ASTLiteral.h>
|
||||||
|
|
||||||
|
#include <Access/Common/AccessFlags.h>
|
||||||
|
|
||||||
#include <DataTypes/DataTypeArray.h>
|
#include <DataTypes/DataTypeArray.h>
|
||||||
#include <DataTypes/DataTypeString.h>
|
#include <DataTypes/DataTypeString.h>
|
||||||
#include <DataTypes/DataTypesNumber.h>
|
#include <DataTypes/DataTypesNumber.h>
|
||||||
@ -78,6 +80,7 @@ ColumnsDescription TableFunctionDictionary::getActualTableStructure(ContextPtr c
|
|||||||
StoragePtr TableFunctionDictionary::executeImpl(
|
StoragePtr TableFunctionDictionary::executeImpl(
|
||||||
const ASTPtr &, ContextPtr context, const std::string & table_name, ColumnsDescription, bool is_insert_query) const
|
const ASTPtr &, ContextPtr context, const std::string & table_name, ColumnsDescription, bool is_insert_query) const
|
||||||
{
|
{
|
||||||
|
context->checkAccess(AccessType::dictGet, getDatabaseName(), table_name);
|
||||||
StorageID dict_id(getDatabaseName(), table_name);
|
StorageID dict_id(getDatabaseName(), table_name);
|
||||||
auto dictionary_table_structure = getActualTableStructure(context, is_insert_query);
|
auto dictionary_table_structure = getActualTableStructure(context, is_insert_query);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user