System.Data.SQLite
Check-in [3a8df73b78]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improvements to 'Password' error messages.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3a8df73b78a6927ff5614d9d51de271f731fc3ec
User & Date: mistachkin 2017-07-31 18:53:50
Context
2017-07-31
19:16
Fix variable leak in tests 'data-1.91' and 'data-1.92'. check-in: 862485361a user: mistachkin tags: trunk
18:53
Improvements to 'Password' error messages. check-in: 3a8df73b78 user: mistachkin tags: trunk
18:25
Update the 'vswhere' tool in Externals to the '2.1.3' release. check-in: 8f3bf26d38 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to System.Data.SQLite/SQLiteConnection.cs.

3895
3896
3897
3898
3899
3900
3901
3902

3903
3904
3905
3906
3907
3908
3909

3910
3911
3912
3913
3914
3915
3916
        }
        _password = null;
#else
        if (FindKey(opts, "HexPassword", DefaultHexPassword) != null)
        {
            throw new SQLiteException(SQLiteErrorCode.Error,
                "Cannot use \"HexPassword\" connection string property: " +
                "library was not built with encryption support");

        }

        if (FindKey(opts, "Password", DefaultPassword) != null)
        {
            throw new SQLiteException(SQLiteErrorCode.Error,
                "Cannot use \"Password\" connection string property: " +
                "library was not built with encryption support");

        }
#endif

        if (!fullUri)
          _dataSource = Path.GetFileNameWithoutExtension(fileName);
        else
          _dataSource = fileName;







|
>






|
>







3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
        }
        _password = null;
#else
        if (FindKey(opts, "HexPassword", DefaultHexPassword) != null)
        {
            throw new SQLiteException(SQLiteErrorCode.Error,
                "Cannot use \"HexPassword\" connection string property: " +
                "library was not built with encryption support, please " +
                "see \"https://www.sqlite.org/see\" for more information");
        }

        if (FindKey(opts, "Password", DefaultPassword) != null)
        {
            throw new SQLiteException(SQLiteErrorCode.Error,
                "Cannot use \"Password\" connection string property: " +
                "library was not built with encryption support, please " +
                "see \"https://www.sqlite.org/see\" for more information");
        }
#endif

        if (!fullUri)
          _dataSource = Path.GetFileNameWithoutExtension(fileName);
        else
          _dataSource = fileName;

Changes to Tests/basic.eagle.

4735
4736
4737
4738
4739
4740
4741
4742

4743
4744
4745
4746
4747
4748
4749
....
4750
4751
4752
4753
4754
4755
4756
4757

4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints [fixConstraints {eagle !System.Data.SQLite.Encryption monoBug28\
command.sql compile.DATA SQLite System.Data.SQLite}] -result {1 {SQL logic\
error -- Cannot use "Password" connection string property: library was not\
built with encryption support}}}


###############################################################################

runTest {test data-1.92 {HexPassword error (no encryption support)} -body {
  list [catch {
    setupDb [set fileName data-1.92.db] "" "" "" "" "HexPassword=1234;"
  } msg] [extractSystemDataSQLiteExceptionMessage $msg]
................................................................................
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints [fixConstraints {eagle !System.Data.SQLite.Encryption monoBug28\
command.sql compile.DATA SQLite System.Data.SQLite}] -result {1 {SQL logic\
error -- Cannot use "HexPassword" connection string property: library was not\
built with encryption support}}}


###############################################################################

reportSQLiteResources $test_channel

###############################################################################

runSQLiteTestFilesEpilogue
runSQLiteTestEpilogue
runTestEpilogue







|
>







 







|
>










4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
....
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints [fixConstraints {eagle !System.Data.SQLite.Encryption monoBug28\
command.sql compile.DATA SQLite System.Data.SQLite}] -result {1 {SQL logic\
error -- Cannot use "Password" connection string property: library was not\
built with encryption support, please see "https://www.sqlite.org/see" for more\
information}}}

###############################################################################

runTest {test data-1.92 {HexPassword error (no encryption support)} -body {
  list [catch {
    setupDb [set fileName data-1.92.db] "" "" "" "" "HexPassword=1234;"
  } msg] [extractSystemDataSQLiteExceptionMessage $msg]
................................................................................
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints [fixConstraints {eagle !System.Data.SQLite.Encryption monoBug28\
command.sql compile.DATA SQLite System.Data.SQLite}] -result {1 {SQL logic\
error -- Cannot use "HexPassword" connection string property: library was not\
built with encryption support, please see "https://www.sqlite.org/see" for more\
information}}}

###############################################################################

reportSQLiteResources $test_channel

###############################################################################

runSQLiteTestFilesEpilogue
runSQLiteTestEpilogue
runTestEpilogue