euberdeveloper / mongoback

The most powerful npm module to export and make backups of your MongoDB
https://mongoback.euber.dev
GNU General Public License v3.0
8 stars 1 forks source link

Adding 25 after a % character in password #24

Closed Daxcor69 closed 1 year ago

Daxcor69 commented 1 year ago

Hello,

so I have a password that has 3 % in it. Each % is anteceded by the characters 25. so a password blob%stuff becomes blob%25stuff. There must be some sort of encoding that is screwing with the % in the password option. I am seeing this in the error message when it shows the assembled in the uri string. I am getting bad auth error and the only thing I can see different is the password, with these additional characters added in.

Brad

euberdeveloper commented 1 year ago

I know that passwords are urlencoded. I honestly don't remember if it was done directly by my lib or if it must be done before putting the password in the Options.

May be that the issue?

euberdeveloper commented 1 year ago

Yes, I can confirm that % urlencoded is %25

Daxcor69 commented 1 year ago

That was the issue, I changed the password to remove the special characters. I will have a look when I have time to see if I can find out who is encoding the characters.

euberdeveloper commented 1 year ago

The password is encoded from this line, but I thought that in order to be used by mongoexport it was necessary to do it manually, not that it expected the non-urlencoded pwd

euberdeveloper commented 1 year ago

I did some trials with the raw mongoexport and it works when in the --uri the string is urlencoded (%25 works, % does not), so I think that this is the expected behaviour