mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
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:
parent
a35b538bde
commit
66380916ee
2 changed files with 3 additions and 1 deletions
|
|
@ -1 +1,2 @@
|
||||||
secret
|
secret
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,7 @@ bool Parser::read_filekey(const char *filekey, char *secret)
|
||||||
my_close(f, MYF(MY_WME));
|
my_close(f, MYF(MY_WME));
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
while (secret[len - 1] == '\r' || secret[len - 1] == '\n') len--;
|
||||||
secret[len]= '\0';
|
secret[len]= '\0';
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue