LiteDB icon indicating copy to clipboard operation
LiteDB copied to clipboard

Remove database password

Open RonaldZaZ opened this issue 9 years ago • 4 comments

If I try to remove the password from the database with the Shrink function, it seems it is still encrypted but with an empty string. So the connection string still needs to contain password= otherwise it can't ready anything.

RonaldZaZ avatar Mar 28 '17 14:03 RonaldZaZ

Are you passing null in password when call Shrink?

mbdavid avatar Mar 28 '17 14:03 mbdavid

I tried "" and String.Empty I will try null and let you know

RonaldZaZ avatar Mar 28 '17 14:03 RonaldZaZ

Empty string is a password :) Checks here:

https://github.com/mbdavid/LiteDB/blob/master/LiteDB/Engine/Engine/Shrink.cs#L56

mbdavid avatar Mar 28 '17 14:03 mbdavid

Ok, thanks, I feel stupid. It works :-)

RonaldZaZ avatar Mar 28 '17 14:03 RonaldZaZ