2012-12-24
| ||
00:14 | • Closed ticket [b4cc611998]: Password with whitespace causes failure to open encrypted database plus 2 other changes artifact: f2c1332a13 user: mistachkin | |
2012-12-15
| ||
10:14 | • Ticket [b4cc611998]: 5 changes artifact: 53051b82b5 user: mistachkin | |
10:12 | Remove one set of surrounding single or double quotes from property names and values parsed from the connection string. Fix for [b4cc611998]. check-in: 46ee3d16d6 user: mistachkin tags: trunk | |
09:07 | Add ParseViaFramework property to the SQLiteConnection class to allow the built-in (i.e. framework provided) connection string parser to be used when opening a connection. Pursuant to [b4cc611998]. check-in: ba458b79fd user: mistachkin tags: trunk | |
2012-12-14
| ||
17:12 | • Ticket [b4cc611998] Password with whitespace causes failure to open encrypted database status still Pending with 3 other changes artifact: 7d3e935604 user: anonymous | |
2012-12-13
| ||
01:19 | • Pending ticket [b4cc611998]. artifact: bbf78d9409 user: mistachkin | |
01:18 | • Ticket [b4cc611998]: 3 changes artifact: fa6fa92523 user: mistachkin | |
01:17 | • Ticket [b4cc611998]: 3 changes artifact: 9437dac7ee user: mistachkin | |
01:10 | Enhance tests for connection passwords that contain spaces, per ticket [b4cc611998]. check-in: 1b95978544 user: mistachkin tags: trunk | |
00:39 | • Ticket [b4cc611998] Password with whitespace causes failure to open encrypted database status still Open with 3 other changes artifact: b12cd49d57 user: mistachkin | |
2012-12-12
| ||
23:35 | • Ticket [b4cc611998]: 8 changes artifact: 7ed18e92c7 user: mistachkin | |
19:20 | • New ticket [b4cc611998]. artifact: 2db8f41511 user: anonymous | |
Ticket Hash: | b4cc6119982bce3b07a0c3be38ce8c83ba88a4a2 | |||
Title: | Password with whitespace causes failure to open encrypted database | |||
Status: | Closed | Type: | Code_Defect | |
Severity: | Important | Priority: | NextRelease | |
Subsystem: | Connection | Resolution: | Fixed | |
Last Modified: | 2012-12-24 00:14:54 | |||
Version Found In: | 1.0.82.0 | |||
User Comments: | ||||
anonymous added on 2012-12-12 19:20:13:
The encrypted database file that was created using 1.0.79.0 cannot be opened using 1.0.82.0 if the password has white space character(s). To reprodue the bug, 1. Create new encrypted database file using 1.0.79.0 library and provide "Test Test" as password. And insert some test data. 2. Try to open the encrypted database file using 1.0.82.0. mistachkin added on 2012-12-13 00:39:15: Does the password start or end with whitespace or is it simply embedded within it? mistachkin added on 2012-12-13 01:17:34:
The current behavior that I'm seeing (with the new tests I just added) is: 1. If the password within a connection string starts with a space, that is preserved. 2. If the password within a connection string contains an embedded space, that is also preserved. 3. If the password within a connection string ends with a space, that is *NOT* preserved. The above behavior is based on the connection string parsing code, as it appears to have existed since prior to version 1.0.79.0. If possible, it would be better to use the SetPassword method on the connection object instead of embedding the password itself within the connection string, to guard against possible future refactoring of the connection string parsing code. mistachkin added on 2012-12-13 01:18:46: It would be very helpful if you could more precisely describe the issue you are seeing, including a short C# code example if possible. mistachkin added on 2012-12-13 01:19:33: Ticket will be closed after the end-of-business on Friday, December 14th, 2012 if no response is received by then. anonymous added on 2012-12-14 17:12:09: The problem occurs only when the password is embedded in a connection string using SQLiteConnectionStringBuilder like this: SQLiteConnectionStringBuilder connectionStringBuilder = new SQLiteConnectionStringBuilder(); connectionStringBuilder.DataSource = this.dataFilePath.ToString(); connectionStringBuilder.Password = "My Password"; connectionStringBuilder.ForeignKeys = true; connectionStringBuilder.DefaultIsolationLevel = IsolationLevel.Serializable; connectionStringBuilder.FailIfMissing = true; string connectionString = connectionStringBuilder.ToString(); SQLiteConnection connection = new SQLiteConnection(connectionString); But after changing above code like following as you suggested, everything works fine. SQLiteConnectionStringBuilder connectionStringBuilder = new SQLiteConnectionStringBuilder(); connectionStringBuilder.DataSource = this.dataFilePath.ToString(); connectionStringBuilder.ForeignKeys = true; connectionStringBuilder.DefaultIsolationLevel = IsolationLevel.Serializable; connectionStringBuilder.FailIfMissing = true; string connectionString = connectionStringBuilder.ToString(); SQLiteConnection connection = new SQLiteConnection(connectionString); connection.SetPassword("My Password"); Thank you. mistachkin added on 2012-12-15 10:14:02: Your example provided me an important clue to the root of the problem. The connection string parsing code was modified to support URI file names and in the process, it was changed to no longer strip surrounding double quotes from the resulting connection property values. This has now been fixed by trunk check-in [46ee3d16d6]. Could you please confirm that the current trunk code no longer shows the issue for you (i.e. when using the SQLiteConnectionStringBuilder)? |