Skip to content

Correctly extract passwords with colons from URL#4709

Merged
josevalim merged 1 commit intoelixir-ecto:masterfrom
pnezis:password-with-colon
Mar 12, 2026
Merged

Correctly extract passwords with colons from URL#4709
josevalim merged 1 commit intoelixir-ecto:masterfrom
pnezis:password-with-colon

Conversation

@pnezis
Copy link
Contributor

@pnezis pnezis commented Mar 12, 2026

iex(1)> Ecto.Repo.Supervisor.parse_url("ecto://user:top:secret@host:12345/mydb")
[
  hostname: "host",
  scheme: "ecto",
  username: "user",
  password: "top",
  database: "mydb",
  port: 12345
]

It correctly works if the password is URL encoded, but since passwords with colon are very common it is better to support them directly as well.

Surprisingly I noticed that mix format does not work in the repo and there is no CI check for formatted code. The reason is that .formatter.exs is missing :inputs. Is this intentional?

@josevalim josevalim merged commit 299cde2 into elixir-ecto:master Mar 12, 2026
8 checks passed
@josevalim
Copy link
Member

Surprisingly I noticed that mix format does not work in the repo and there is no CI check for formatted code. The reason is that .formatter.exs is missing :inputs. Is this intentional?

Yes, we are still formatting the codebase bit by bit.

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.

2 participants