Skip to content

Comments

deps(pgx): update driver to address CVE-2024-27289#463

Merged
burningalchemist merged 1 commit intoburningalchemist:masterfrom
puneetloya:update_pgx
Mar 7, 2024
Merged

deps(pgx): update driver to address CVE-2024-27289#463
burningalchemist merged 1 commit intoburningalchemist:masterfrom
puneetloya:update_pgx

Conversation

@puneetloya
Copy link
Contributor

@puneetloya puneetloya commented Mar 7, 2024

resolves CVE-2024-27289

@puneetloya puneetloya changed the title update pgx to address CVE-2024-27289 update deps pgx from 4.18.1 -> 4.18.2 to address CVE-2024-27289 Mar 7, 2024
@burningalchemist burningalchemist changed the title update deps pgx from 4.18.1 -> 4.18.2 to address CVE-2024-27289 deps(pgx): update driver to address CVE-2024-27289 Mar 7, 2024
@burningalchemist burningalchemist self-requested a review March 7, 2024 19:35
@burningalchemist burningalchemist merged commit d9bd930 into burningalchemist:master Mar 7, 2024
@burningalchemist
Copy link
Owner

Thank you for your contribution! 🚀

@vvitad
Copy link

vvitad commented Mar 28, 2024

@puneetloya hi! could you help, please?
i've installed the latest release, but exporter still works under pq. how do i configure it to use pgx?

@puneetloya
Copy link
Contributor Author

puneetloya commented Mar 28, 2024

@vvitad Something that you can try:

You can delete this line: https://github.com/burningalchemist/sql_exporter/blob/master/drivers.go#L9C5-L9C22

Run make drivers-all

Then build sql exporter and use it.

FYI, there are better ways than this.

Just to confirm are you using db url as:
pgx://postgres:PASSWORD@HOST:6543/postgres?default_query_exec_mode=simple_protocol

@burningalchemist
Copy link
Owner

burningalchemist commented Mar 28, 2024

@vvitad, To use pgx driver you need to change the scheme name to pgx in your DSN. Both drivers are available out of the box, so you don't need to rebuild the binary unless you really need it.

Reference: https://github.com/xo/dburl?tab=readme-ov-file#database-schemes-aliases-and-drivers

@vvitad
Copy link

vvitad commented Mar 28, 2024

Thanks for answers! I found myself a go developer and he helped. But we didn't know to change postgres(didn't know it is pq) to pgx at first so we deleted any mention of pq, and than changed dsn in code, and than built the binary.
So much work, should have checked my notifications sooner to see you replies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants