Skip to content

[Bug]: Some strings aren't being escaped properly #10506

Description

@sxd

Is there an existing issue already for this bug?

  • I have searched for an existing issue, and could not find anything. I believe this is a new bug.

I have read the troubleshooting guide

  • I have read the troubleshooting guide and I think this is a new bug.

I am running a supported version of CloudNativePG

  • I have read the troubleshooting guide and I think this is a new bug.

Contact Details

No response

Version

1.29 (latest patch)

What version of Kubernetes are you using?

1.35

What is your Kubernetes environment?

Self-managed: kind (evaluation)

How did you install the operator?

YAML manifest

What happened?

Some strings in that arrive to custom.conf will arrive without being properly escaped creating corrupted configuration that may or may not be ended up in a cluster that will not start or reload properly.

Some of the places for this happening are:
https://github.com/cloudnative-pg/cloudnative-pg/blob/main/pkg/postgres/configuration.go#L904
https://github.com/cloudnative-pg/cloudnative-pg/blob/main/api/v1/cluster_funcs.go#L1474

There's probably more places for this to happen.

We should validate and/or escape the strings before arriving to custom.conf file.

Cluster resource

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

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

Metadata

Metadata

Assignees

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions