mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01: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));
|
||||
if (len <= 0)
|
||||
return 1;
|
||||
while (secret[len - 1] == '\r' || secret[len - 1] == '\n') len--;
|
||||
secret[len]= '\0';
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue