MDEV-7993 file_key_management_filekey doesn't work as expected with FILE:

chomp the secret, as read from the file. remove trailing
CR and LF bytes.
This commit is contained in:
Sergei Golubchik 2015-05-10 11:03:33 +02:00
parent a35b538bde
commit 66380916ee
2 changed files with 3 additions and 1 deletions

View file

@ -1 +1,2 @@
secret

View file

@ -173,6 +173,7 @@ bool Parser::read_filekey(const char *filekey, char *secret)
my_close(f, MYF(MY_WME));
if (len <= 0)
return 1;
while (secret[len - 1] == '\r' || secret[len - 1] == '\n') len--;
secret[len]= '\0';
return 0;
}