Fix critical bug where a collumn with newline or tab would scramble the data
This commit is contained in:
parent
7121754106
commit
a453286ba7
1 changed files with 3 additions and 0 deletions
|
|
@ -34,6 +34,8 @@ void passman::encrypt()
|
||||||
{
|
{
|
||||||
for (QString& entry_column : entry_row)
|
for (QString& entry_column : entry_row)
|
||||||
{
|
{
|
||||||
|
entry_column = entry_column.replace("\n", "");
|
||||||
|
entry_column = entry_column.replace("\t", "");
|
||||||
data.append((entry_column + '\t').toLocal8Bit());
|
data.append((entry_column + '\t').toLocal8Bit());
|
||||||
}
|
}
|
||||||
data.append(QString('\n').toLocal8Bit());
|
data.append(QString('\n').toLocal8Bit());
|
||||||
|
|
@ -66,6 +68,7 @@ bool passman::decrypt()
|
||||||
{
|
{
|
||||||
if (ch == '\n')
|
if (ch == '\n')
|
||||||
{
|
{
|
||||||
|
std::cout << line.toStdString() << std::endl;
|
||||||
if (line == "password")
|
if (line == "password")
|
||||||
{
|
{
|
||||||
line = "";
|
line = "";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue