Re: Bug fix in vacuumdb --buffer-usage-limit xxx -Z
От | David Rowley |
---|---|
Тема | Re: Bug fix in vacuumdb --buffer-usage-limit xxx -Z |
Дата | |
Msg-id | CAApHDvqrfvwJy1g7bwBQgr9uTJU9e4OEtiLLDVfNuPmjB3+QFw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Bug fix in vacuumdb --buffer-usage-limit xxx -Z (David Rowley <dgrowleyml@gmail.com>) |
Ответы |
Re: Bug fix in vacuumdb --buffer-usage-limit xxx -Z
Re: Bug fix in vacuumdb --buffer-usage-limit xxx -Z |
Список | pgsql-hackers |
On Thu, 21 Sept 2023 at 16:18, David Rowley <dgrowleyml@gmail.com> wrote: > Thanks for the report and the patch. I agree this has been overlooked. > > I also wonder if we should be escaping the buffer-usage-limit string > sent in the comment. It seems quite an unlikely attack vector, as the > user would have command line access and could likely just use psql > anyway, but I had thought about something along the lines of: > > $ vacuumdb --buffer-usage-limit "1MB'); drop database postgres;--" postgres > vacuumdb: vacuuming database "postgres" > vacuumdb: error: processing of database "postgres" failed: ERROR: > VACUUM cannot run inside a transaction block > > seems that won't work, due to sending multiple commands at once, but I > think we should fix it anyway. I've pushed your patch plus some additional code to escape the text specified in --buffer-usage-limit before passing it to the server in commit 5cfba1ad6 Thanks again for the report. David
В списке pgsql-hackers по дате отправления: