| Bug #35332 | GetPassword() don't working (when PasswordAnswer is NULL) | ||
|---|---|---|---|
| Submitted: | 17 Mar 2008 12:26 | Modified: | 16 May 2008 15:19 |
| Reporter: | Andrey Yusupov | ||
| Status: | Closed | ||
| Category: | Connector/Net | Severity: | S2 (Serious) |
| Version: | 5.2.1 | OS: | Microsoft Windows |
| Assigned to: | Target Version: | ||
| Tags: | GetPassword | ||
[26 Mar 2008 17:53]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/44463
[26 Mar 2008 17:53]
Reggie Burnett
Fixed in 5.2.2
[16 May 2008 15:19]
MC Brown
A note has been added to the 5.2.2 changelog: An error would be raised when calling GetPassword() with a NULL value.

Description: MySQLMembershipProvider If PasswordAnswer is NULL GetPassword() don't working and generate exception. How to repeat: 1) Set in provider: requiresQuestionAndAnswer="false" 2) Create user without Qyestion and Answer 3) Execute User.GetPassword() Suggested fix: // exception when PasswordAnswer is NULL // GetString don't work with DB NULL values string passwordAnswer = reader.GetString("PasswordAnswer"); // work string passwordAnswer = reader.GetValue(reader.GetOrdinal("PasswordAnswer")).ToString();