Re: Potential vuln in example for "F.25.1.1. digest()"

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Potential vuln in example for "F.25.1.1. digest()"
Дата
Msg-id CAKFQuwZVWK8J3Nw+f=ERH_2hG6iFTVkOc0ciDX1a8vnAb11+HQ@mail.gmail.com
обсуждение исходный текст
Ответ на Potential vuln in example for "F.25.1.1. digest()"  (PG Doc comments form <noreply@postgresql.org>)
Ответы Re: Potential vuln in example for "F.25.1.1. digest()"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-docs
On Tuesday, August 17, 2021, PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/pgcrypto.html
Description:

Hi,
in "F.25.1.1. digest()" you suggest:

CREATE OR REPLACE FUNCTION sha1(bytea) returns text AS $$
    SELECT encode(digest($1, 'sha1'), 'hex')
$$ LANGUAGE SQL STRICT IMMUTABLE;

While this is a great example, it may expose a database app to
vulnerabilities if the attacker succeeds in overriding the function
sha1(...) in the app's user context (schema)


You should read this:


David J.

В списке pgsql-docs по дате отправления:

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: Potential vuln in example for "F.25.1.1. digest()"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Potential vuln in example for "F.25.1.1. digest()"