Authentication error on credentials with the character '#'
gustavoalves23 opened this issue · 1 comments
I am facing a issue where, when the DB connection URL has the character '#' on it, the URL is splited on this character, causing the authentication to fail.
I tried this on SQL Server, but i believe happens on other adapters.
Expected Behavior
Be able to authenticate on DBs with # on its password.
Current Behavior
DB refuses to authenticate because the password sent is wrong
Possible Solution
After some debug, i found out this line:
vim-dadbod/autoload/db/url.vim
Line 20 in 37523ff
Because of that, its removing everything after some '#'
Looks like the # character is related to something called fragment:
vim-dadbod/autoload/db/url.vim
Line 113 in 37523ff
But i don't know exacly what is it purpose.
i made a fork that just remove some lines related to them and fixed the problem for me, but probably broke something related to those fragments.
Steps to Reproduce
- Add the vim-dadbod plugin on vim.
- Run a container with sql server: docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=12345678#abc@" -e "MSSQL_PID=Evaluation" -p 1433:1433 --hostname sqlpreview -d mcr.microsoft.com/mssql/server:2022-preview-ubuntu-22.04
- Try to connect with the connection url: sqlserver://localhost:1433;user=sa;password=12345678#abc@
- It will fail, try to redo steps 2 and 3 but without the # on the password and it will work