mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-10-12 13:31:01 -04:00
Merge branch 'develop' into feature/yubikey
This commit is contained in:
commit
e17576a6f7
30 changed files with 314 additions and 126 deletions
|
@ -301,7 +301,7 @@ bool KeePass2Reader::readHeaderField()
|
|||
break;
|
||||
|
||||
case KeePass2::TransformRounds:
|
||||
setTansformRounds(fieldData);
|
||||
setTransformRounds(fieldData);
|
||||
break;
|
||||
|
||||
case KeePass2::EncryptionIV:
|
||||
|
@ -382,7 +382,7 @@ void KeePass2Reader::setTransformSeed(const QByteArray& data)
|
|||
}
|
||||
}
|
||||
|
||||
void KeePass2Reader::setTansformRounds(const QByteArray& data)
|
||||
void KeePass2Reader::setTransformRounds(const QByteArray& data)
|
||||
{
|
||||
if (data.size() != 8) {
|
||||
raiseError("Invalid transform rounds size");
|
||||
|
|
|
@ -48,7 +48,7 @@ private:
|
|||
void setCompressionFlags(const QByteArray& data);
|
||||
void setMasterSeed(const QByteArray& data);
|
||||
void setTransformSeed(const QByteArray& data);
|
||||
void setTansformRounds(const QByteArray& data);
|
||||
void setTransformRounds(const QByteArray& data);
|
||||
void setEncryptionIV(const QByteArray& data);
|
||||
void setProtectedStreamKey(const QByteArray& data);
|
||||
void setStreamStartBytes(const QByteArray& data);
|
||||
|
|
|
@ -178,7 +178,7 @@ bool KeePass2XmlReader::parseKeePassFile()
|
|||
Q_ASSERT(m_xml.isStartElement() && m_xml.name() == "KeePassFile");
|
||||
|
||||
bool rootElementFound = false;
|
||||
bool rootParsedSuccesfully = false;
|
||||
bool rootParsedSuccessfully = false;
|
||||
|
||||
while (!m_xml.error() && m_xml.readNextStartElement()) {
|
||||
if (m_xml.name() == "Meta") {
|
||||
|
@ -186,11 +186,11 @@ bool KeePass2XmlReader::parseKeePassFile()
|
|||
}
|
||||
else if (m_xml.name() == "Root") {
|
||||
if (rootElementFound) {
|
||||
rootParsedSuccesfully = false;
|
||||
rootParsedSuccessfully = false;
|
||||
raiseError("Multiple root elements");
|
||||
}
|
||||
else {
|
||||
rootParsedSuccesfully = parseRoot();
|
||||
rootParsedSuccessfully = parseRoot();
|
||||
rootElementFound = true;
|
||||
}
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ bool KeePass2XmlReader::parseKeePassFile()
|
|||
}
|
||||
}
|
||||
|
||||
return rootParsedSuccesfully;
|
||||
return rootParsedSuccessfully;
|
||||
}
|
||||
|
||||
void KeePass2XmlReader::parseMeta()
|
||||
|
@ -458,12 +458,12 @@ bool KeePass2XmlReader::parseRoot()
|
|||
Q_ASSERT(m_xml.isStartElement() && m_xml.name() == "Root");
|
||||
|
||||
bool groupElementFound = false;
|
||||
bool groupParsedSuccesfully = false;
|
||||
bool groupParsedSuccessfully = false;
|
||||
|
||||
while (!m_xml.error() && m_xml.readNextStartElement()) {
|
||||
if (m_xml.name() == "Group") {
|
||||
if (groupElementFound) {
|
||||
groupParsedSuccesfully = false;
|
||||
groupParsedSuccessfully = false;
|
||||
raiseError("Multiple group elements");
|
||||
continue;
|
||||
}
|
||||
|
@ -473,7 +473,7 @@ bool KeePass2XmlReader::parseRoot()
|
|||
Group* oldRoot = m_db->rootGroup();
|
||||
m_db->setRootGroup(rootGroup);
|
||||
delete oldRoot;
|
||||
groupParsedSuccesfully = true;
|
||||
groupParsedSuccessfully = true;
|
||||
}
|
||||
|
||||
groupElementFound = true;
|
||||
|
@ -486,7 +486,7 @@ bool KeePass2XmlReader::parseRoot()
|
|||
}
|
||||
}
|
||||
|
||||
return groupParsedSuccesfully;
|
||||
return groupParsedSuccessfully;
|
||||
}
|
||||
|
||||
Group* KeePass2XmlReader::parseGroup()
|
||||
|
|
|
@ -566,9 +566,9 @@ QString KeePass2XmlWriter::stripInvalidXml10Chars(QString str)
|
|||
// keep valid surrogate pair
|
||||
i--;
|
||||
}
|
||||
else if ((uc < 0x20 && uc != 0x09 && uc != 0x0A && uc != 0x0D) // control chracters
|
||||
|| (uc >= 0x7F && uc <= 0x84) // control chracters, valid but discouraged by XML
|
||||
|| (uc >= 0x86 && uc <= 0x9F) // control chracters, valid but discouraged by XML
|
||||
else if ((uc < 0x20 && uc != 0x09 && uc != 0x0A && uc != 0x0D) // control characters
|
||||
|| (uc >= 0x7F && uc <= 0x84) // control characters, valid but discouraged by XML
|
||||
|| (uc >= 0x86 && uc <= 0x9F) // control characters, valid but discouraged by XML
|
||||
|| (uc > 0xFFFD) // noncharacter
|
||||
|| ch.isLowSurrogate() // single low surrogate
|
||||
|| ch.isHighSurrogate()) // single high surrogate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue