crossplane-contrib / crossplane-contrib/provider-sql

PostgreSQL Database object shows password in status when the connection string contains a non-valid character

Open
#266 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
154
Forks
119
Avg merge
6d 17h
Merged PRs (30d)
8

Description

### What happened?
PostgreSQL `Database` object shows password in status when the connection string contains a non-valid character

```yaml
apiVersion: postgresql.sql.crossplane.io/v1alpha1
kind: Database
# metadata omitted
# spec omitted
status:
conditions:
- lastTransitionTime: "2025-09-01T15:34:28Z"
message: 'observe failed: cannot select database: parse "postgres://app:dGhlc2UgYXJlIG5vdCB0aGUgcGFzd29yZHM=@app-rw.retracted\n:5432/postgres?sslmode=verify-full":
net/url: invalid control character in URL'
reason: ReconcileError
```

### How can we reproduce it?
Add invalid character in URL, such as newline of base64 encoding of the value as I did here.

### What environment did it happen in?
Crossplane version: `xpkg.upbound.io/crossplane/crossplane:v1.19.0`

Crossplane SQL version: `xpkg.upbound.io/crossplane-contrib/provider-sql:v0.9.0`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.