Felix Geyer
fff9e7ac46
Convert Q_FOREACH loops to C++11 for loops.
...
Q_FOREACH will de deprecated soon.
2016-10-02 21:45:55 -04:00
Felix Geyer
c78822f6e6
Merge branch '2.0'
2016-10-02 21:45:54 -04:00
Felix Geyer
ba68e0a4a1
Show proper error message when key is wrong for .kdb files.
2016-09-29 22:08:20 -04:00
Felix Geyer
8a7e98820a
Fix typo.
...
# Conflicts:
# src/format/KeePass2Reader.cpp
2016-09-29 22:08:10 -04:00
Florian Geyer
8d16522d39
Repair UUID of inconsistent history items.
...
Closes #130
2016-08-03 23:48:40 +02:00
Felix Geyer
57c1a0f4b6
Show proper error message when key is wrong for .kdb files.
2016-04-09 16:09:53 +02:00
Felix Geyer
bde4d63fdb
Fix typo.
2016-04-09 16:02:49 +02:00
Felix Geyer
d6d92ce90a
Merge branch '2.0'
2016-02-08 18:13:29 +01:00
Felix Geyer
208b803fbe
Fix KeePass2Repair to retain multi-byte UTF-8 chars.
...
Since char is (often) unsigned the ch < 0x20 check matched all
multi-byte encoded UTF-8 chars.
2016-02-02 00:41:16 +01:00
Felix Geyer
8a92cec03f
Keep valid surrogate pairs in stripInvalidXml10Chars().
2016-02-02 00:38:58 +01:00
Felix Geyer
107c0673c7
Make sure we don't write negative icon ids into the database.
2016-01-31 17:06:51 +01:00
Felix Geyer
c14d04b3e8
Fix crash when icon id is larger than INT_MAX.
...
In these cases icon id was interpreted as a negative number.
The QList access with a negative index resulted in a crash.
2016-01-31 16:44:34 +01:00
Felix Geyer
bfae81ec70
Use C++11 keyword directly in new methods.
2016-01-29 17:25:32 +01:00
Felix Geyer
71d4cb781d
Merge branch '2.0'
2016-01-29 17:22:37 +01:00
Felix Geyer
eb56bd8973
Add repair functionality to strip invalid XML chars.
...
Refs #392
2016-01-28 23:07:04 +01:00
Felix Geyer
2d741afe3e
Strip invalid XML chars when writing databases.
...
These characters are unprintable or just plain invalid.
QXmlStreamReader throws and error when reading XML documents with such chars.
Closes #392
2016-01-24 17:20:16 +01:00
Felix Geyer
6e45cf0dab
Use C++11 keywords directly.
2015-10-11 10:47:30 +02:00
Felix Geyer
3b2a39fd38
Merge branch '2.0'
2015-09-26 11:44:27 +02:00
Felix Geyer
54f44f5267
Show a better message when trying to open an old database format.
...
Refs #338
2015-09-23 23:16:49 +02:00
Felix Geyer
7fa0eddc5f
Make C++11 mandatory.
2015-09-12 13:55:50 +02:00
Felix Geyer
20b13a4a2e
Ger rid of last Qt 4 version check.
2015-09-12 13:51:49 +02:00
Felix Geyer
9882f16614
Remove Tools::currentDateTimeUtc().
2015-09-12 13:51:49 +02:00
Felix Geyer
0422943d52
Explicitly close/reset streams so we can detect errors.
2015-07-20 21:35:48 +02:00
Felix Geyer
0024f2e30f
Signal errors in QXmlStreamWriter upstream.
...
Unfortunately the method is only avaiable in Qt >= 4.8.
Not much we can do about that.
2015-07-20 21:35:43 +02:00
Felix Geyer
ceb6a0383e
Add ability to export databases to CSV files.
...
Based on implementation by Florian Geyer <blueice@fobos.de>
Closes #57
2015-07-14 22:14:34 +02:00
Felix Geyer
c6105a08ab
KeePass2XmlReader: Don't fail wheh nreading empty UUIDs.
...
Closes #298
2015-07-13 21:01:55 +02:00
Felix Geyer
7a2c02f0df
Initialize some instance variables in ctor.
...
Discovered by Coverity.
Most likely doesn't fix any actual bug but better be safe.
2015-05-14 16:58:53 +02:00
Felix Geyer
f6243675c9
Warn if result of processInPlace() is unchecked.
...
Fix callers accordingly.
2015-05-09 23:21:50 +02:00
Felix Geyer
a762cef0a9
Catch and handle all errors from libgcrypt.
2015-05-09 23:21:44 +02:00
dartraiden
3fca61dc24
spelling correction, fixed typos
2015-05-06 19:38:43 +03:00
Felix Geyer
eb22f0a2d8
Raise an error when parsing duplicate attributes/attachments.
2014-12-03 23:36:53 +01:00
Felix Geyer
71d39865b3
Introduce a strict mode in KeePass2XmlReader.
...
Many errors are now ignored when not in strict mode so we can still parse
files that have been written by broken/incomplete implementations.
2014-12-01 21:52:51 +01:00
Ben Boeckel
66b3d22041
Use QString::toLatin1() rather than ::toAscii()
...
The toAscii (and fromAscii) are removed from Qt5 in favor of Latin1.
2013-11-24 21:19:20 +01:00
Felix Geyer
9c788a6e84
Support custom backends in Random.
...
Useful for tests.
2013-10-09 22:06:32 +02:00
Felix Geyer
6504b6f2bd
Drop Qt module name from include statements.
...
This is a preparation to be able to build KeePassX against Qt 5.
2013-10-03 15:18:16 +02:00
Felix Geyer
5c84aa308d
Improve error messages for reading and wriiting databases.
...
Closes #7
2013-06-30 14:43:02 +02:00
Felix Geyer
db6ac26794
Initialize variables to silence compiler warnings.
2013-05-01 12:03:03 +02:00
Felix Geyer
6df30df992
Really fix parsing when the db contains two Root (Group) elements.
2013-04-30 17:04:54 +02:00
Felix Geyer
0ec29b2354
Raise error if we don't find exactly one root group.
2013-04-29 22:31:50 +02:00
Felix Geyer
e16720d06d
When parsing make sure that databases contain at least the root group.
2013-04-29 22:31:50 +02:00
Felix Geyer
3be7fa6b3b
Raise error when required xml elements are missing.
2013-04-29 22:31:50 +02:00
Felix Geyer
d182586557
Make sure KeePass1Reader::key() isn't used before the variables are set.
2013-04-29 22:31:50 +02:00
Felix Geyer
1f5564760f
Make sure groupId and groupLevel are set in KeePass1Reader::readGroup().
2013-04-29 22:31:50 +02:00
Felix Geyer
7a89510916
Make more key/value-type functions safe against reordered xml elements.
2013-04-29 22:31:50 +02:00
Felix Geyer
5588792344
Make KeePass2XmlReader::parseGroup() safe against reordered xml elements.
2013-04-29 22:31:50 +02:00
Felix Geyer
3acb33e05a
Make KeePass2XmlReader::parseEntry() safe against reordered xml elements.
2013-04-29 22:31:50 +02:00
Felix Geyer
3658a65380
Use Q_NULLPTR instead of 0.
2013-04-29 22:31:49 +02:00
Felix Geyer
f1719cfc5f
Small optimizations.
2012-10-28 11:27:10 +01:00
Florian Geyer
f5eafe6522
Assert that the tmp group has no children when import is finished.
2012-10-28 10:25:43 +01:00
Andreas Piesk
00908856c3
don't abort import if there are entries with invalid groups,
...
log it and assign them to the root-group
2012-10-28 09:36:27 +01:00
Felix Geyer
78c125af4e
Check if all required database headers were present.
2012-10-12 12:09:22 +02:00
Felix Geyer
18d3fe55f8
Add support for database format 3.01 (HeaderHash).
...
Add test for the format 3.00 and upgrade Compressed.kdbx, NonAscii.kdbx
and ProtectedStrings.kdbx to 3.01.
Add a test for an incorrect HeaderHash.
2012-09-25 22:33:36 +02:00
Felix Geyer
ecea101962
Return Q_NULLPTR instead of 0 when the return type is a pointer.
2012-07-23 14:58:57 +02:00
Felix Geyer
fcc936ceff
Disable searching and auto-type for the Backup group imported from KeePass1.
2012-07-23 13:21:17 +02:00
Felix Geyer
9a2aba56fc
Set name of the root group when importing KeePass 1 databases.
2012-07-21 22:21:49 +02:00
Felix Geyer
b6d9c2e486
Import Auto-Type associations in KeePass1Reader.
2012-07-19 23:21:12 +02:00
Felix Geyer
f98d834edb
Move Auto-Type associations handling from Entry into an own class.
2012-07-16 09:54:04 +02:00
Felix Geyer
4b6cae0fcd
Fix some compiler warnings.
...
Implements parts of
https://gitorious.org/keepassx/keepassx/merge_requests/18
2012-07-08 11:27:11 +02:00
Felix Geyer
d826ae5daf
Add assert to make sure the temp file could be opened successfully.
2012-07-03 12:39:03 +02:00
Felix Geyer
baa5a74ba0
Convert iconCount() and expiredIconIndex() to constants.
2012-06-29 15:22:43 +02:00
Felix Geyer
68155e8f89
Make use of Q_NULLPTR.
2012-06-29 14:15:16 +02:00
Felix Geyer
d0016bf6c4
Fix reading non-ASCII passwords that are protected.
...
Closes #28
2012-06-24 18:22:18 +02:00
Felix Geyer
38d2b124d8
Fix datetime serialization appending two 'Z' at the end with Qt >= 4.8.
2012-06-24 11:25:06 +02:00
Felix Geyer
513ba6d19d
Write empty strings as short empty XML elements.
...
For example instead of
<DatabaseName></DatabaseName>
we now write
<DatabaseName/>
Closes #29
2012-06-23 20:15:14 +02:00
Felix Geyer
5297722ede
Include header cleanup.
2012-05-20 23:08:23 +02:00
Felix Geyer
f8bea82ce8
Emit error on invalid HistoryMaxItems and HistoryMaxSize values.
2012-05-19 15:05:07 +02:00
Felix Geyer
a407e0082b
Coding style improvements.
2012-05-14 19:10:42 +02:00
Felix Geyer
924130e0fe
Use Q_FOREACH instead of QListIterator.
2012-05-14 17:56:43 +02:00
Florian Geyer
a57e8f9864
Preserve order of custom icons.
...
Closes #25
2012-05-13 20:50:41 +02:00
Felix Geyer
af726d465d
Fix typo.
2012-05-13 13:33:55 +02:00
Felix Geyer
23792eb069
Remove some asserts in KeePass1Reader.
2012-05-13 13:32:28 +02:00
Felix Geyer
05c41c083e
Implement GUI to import KeePass 1 databases.
...
Closes #2
2012-05-12 10:13:00 +02:00
Felix Geyer
587a647c11
New TODO comment style.
...
Qt Creator 2.5 is able to parse those.
2012-05-11 12:39:06 +02:00
Felix Geyer
65bdc207b7
Make sure we don't create DeletedObjects when importing databases.
2012-05-10 22:54:26 +02:00
Felix Geyer
366d8a0f0e
Set master key after reading the database.
2012-05-10 22:46:36 +02:00
Felix Geyer
9d8e276950
Set uuids for entries.
2012-05-10 21:35:26 +02:00
Felix Geyer
cf4e574c50
Support Twofish encrypted KeePass 1 databases.
...
Refs #2
2012-05-10 21:06:33 +02:00
Felix Geyer
c02b5abc6e
Fix composite keys in KeePass1Reader.
2012-05-10 19:33:49 +02:00
Felix Geyer
7fd8154ea8
Add support for parsing KeePass 1 keyfiles.
...
Refs #2
2012-05-10 19:33:16 +02:00
Felix Geyer
65f2790170
Parse KeePass 1 database meta streams.
...
Refs #2
2012-05-10 11:44:25 +02:00
Felix Geyer
79b15e2ac6
Implement support for parsing groups and entries from KeePass 1 databases.
...
Still missing:
- Key files.
- Twofish encryption.
Refs #2
2012-05-09 23:16:32 +02:00
Felix Geyer
ebce183925
Start implementing support for reading KeePass 1 databases.
...
For now only decrypting the database works.
Still missing:
- Actually parsing the database.
- Key files.
Refs #1
2012-05-08 22:06:12 +02:00
Felix Geyer
739f4d97a6
Coding style fixes.
2012-05-02 17:04:03 +02:00
Felix Geyer
f89ffa10e6
Add Tools::readAllFromDevice().
...
Make KeePass2XmlReader::readCompressedBinary() use the new function.
2012-05-02 11:06:24 +02:00
Felix Geyer
3df2ad35cb
Constification and some style fixes.
2012-04-23 21:09:01 +02:00
Felix Geyer
f28f868671
Coding style fixes.
2012-04-23 17:02:09 +02:00
Felix Geyer
67bf8e7b2a
Write history only for entries that are not history items.
2012-04-22 22:33:14 +02:00
Felix Geyer
baed7d76cf
Use QHash for temporary entry/group containers.
...
Closes #11
2012-04-22 12:30:38 +02:00
Felix Geyer
8acd6f74d8
Support KeePass format 3.00 (used by KeePass2 >= 2.15).
...
Closes #6
Attachments are now stored in a pool under Metadata instead of in entries.
The protected flag of attachments isn't supported anymore.
New metadata attributes: color, historyMaxItems and historyMaxSize.
Dropped metadata attribute: autoEnableVisualHiding.
2012-04-21 16:45:46 +02:00
Felix Geyer
2e011d5362
Improve code style.
2012-04-18 22:08:22 +02:00
Florian Geyer
e1632e8087
Disable timeinfo update for history entries on database parsing.
2012-04-18 17:03:57 +02:00
Felix Geyer
d4a94a8996
Move attributes and attachments handking from Entry into own classes.
2012-04-14 15:38:20 +02:00
Florian Geyer
674909f635
Add modified signals for entries.
2012-04-11 21:50:20 +02:00
Florian Geyer
8b62365f8e
Add modified signals for groups.
2012-04-11 21:50:20 +02:00
Florian Geyer
3c0efd6809
Fix missing write of group notes.
2012-04-11 21:50:20 +02:00
Florian Geyer
c80be1dd84
Add modified signals for metadata.
2012-04-11 21:50:20 +02:00
Felix Geyer
2f58b854ed
Print warning about invalid entry references.
2012-04-11 18:46:23 +02:00
Felix Geyer
d527e63f1f
Change the Entry attributes/attachment API to provide a stable key order.
2012-04-06 19:33:29 +02:00
Felix Geyer
279585fff4
Mark some constructor as explicit.
2012-01-11 19:18:35 +01:00
Felix Geyer
e397080d79
Rename addAttribute() to setAttribute() and addAttachment() to setAttachment().
2012-01-07 16:22:11 +01:00
Felix Geyer
007a901dba
Proper error handling for reading databases.
2012-01-06 20:03:13 +01:00
Felix Geyer
00aafa69f5
Store database icons as QImage instead of QIcon.
...
This has the advantage that they can be used without a running X server.
Add methods to retrieve QPixmaps that are converted from the stored QImages
and cached by QPixmapCache.
2012-01-01 21:52:54 +01:00
Felix Geyer
bce46c5ece
Enforce that group/entry uuid is set when writing a database.
2011-12-27 15:47:06 +01:00
Felix Geyer
9ffa5232f5
Remove some unneeded includes.
2011-11-12 12:20:08 +01:00
Felix Geyer
027362be76
Notify entry/group parent on deletion.
...
Also make the root group pseudo static, i.e. it shouldn't be changed
after the database has been fully constructed.
2011-07-09 21:54:01 +02:00
Felix Geyer
d4f02a78a7
Coding style fixes.
2011-07-08 14:51:14 +02:00
Felix Geyer
4dbdc4d847
Make some Group methods private.
2011-07-08 13:57:02 +02:00
Felix Geyer
afb285a476
Use a special enum for inherit/enable/disable variables.
2011-07-07 12:45:14 +02:00
Felix Geyer
a299dd9715
Integrate KeePass2RandomStream into KeePass2 reader and writer classes.
...
This hopefully completes support for reading/writing kdbx <= 2.14 files.
Also fix a bug in KeePass2XmlWriter so it sets Protected="True" in the Value
tag instead of Key.
2011-07-07 00:15:52 +02:00
Felix Geyer
58e048be96
Add KeePass2RandomStream class.
...
It's responsible for processing protected strings in kdbx files.
2011-07-07 00:08:37 +02:00
Felix Geyer
ef8935431c
Add ability to grab the raw xml string of kdbx databases.
2011-07-06 20:21:40 +02:00
Felix Geyer
c548c7f4b4
Add initial support for writing protected strings.
2011-06-29 16:43:14 +02:00
Felix Geyer
6afda908bc
Move key transform() call into Database.
2011-06-29 16:39:39 +02:00
Felix Geyer
fd9685037b
Support writing empty color.
2011-06-29 16:33:23 +02:00
Felix Geyer
cfb55828b6
Add initial support for encrypted database fields.
2011-01-13 22:31:17 +01:00
Felix Geyer
e3da80fcc6
Add KeePass2Writer.
...
Support attributes MasterKeyChanged, MasterKeyChangeRec, MasterKeyChangeForce and Tags.
Close streams in the dtor.
2010-09-25 12:41:00 +02:00
Felix Geyer
b8dfb9cc4d
Add support for gzip compressed databases.
2010-09-23 22:27:59 +02:00
Felix Geyer
f0e711ac23
Warn about unsupported icon ids.
2010-09-23 00:21:36 +02:00
Felix Geyer
537ffafefd
Add unit test TestKeePass2Reader.
2010-09-20 00:16:30 +02:00
Felix Geyer
567dd92d4c
Add built-in icons.
2010-09-19 21:22:24 +02:00
Felix Geyer
9f282928e8
Implement reading encrypted kdbx files.
2010-09-13 23:24:36 +02:00
Felix Geyer
f5dd24fdbe
Use upper case names for constants.
2010-09-05 11:46:36 +02:00
Felix Geyer
1cfc34361a
Add interface for database reader/writer.
2010-08-31 16:18:45 +02:00
Felix Geyer
ee4c2c3dd4
Move core/Parser to format/KeePass2XmlReader and core/Writer to format/KeePass2XmlWriter.
2010-08-31 14:39:35 +02:00