View Issue Details

IDProjectCategoryView StatusLast Update
0003175mantisbtbugtrackerpublic2003-12-13 04:36
Reportersmhanson Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionopen 
Product Versiongit trunk 
Summary0003175: login fails when saved password is PLAIN and login_method is not PLAIN
Description

I updated to CVS HEAD and did not immediately heed the warning to change my login_method to something other than CRYPT_FULL_SALT. As a result, Mantist started saving passwords in plaintext to the database (a bug in itself). When I switched the login_method to MD5 or CRYPT, the accounts with the saved plain passwords were unable to login.

Additional Information

The problem seems to be that PLAIN is defined as 0 in core/config_api.php, which confuses the function auth_process_plain_password when it checks whether $p_method != null.

I was able to work around the problem by defining PLAIN as something other than 0 and using login_method MD5.

TagsNo tags attached.

Activities

Narcissus

Narcissus

2003-07-11 06:05

reporter   ~0004395

The alternative is to change that ($p_method != null) comparison to ($p_method !== null). Note the double equal.

vboctor

vboctor

2003-07-13 12:27

manager   ~0004402

Recommended fix applied in CVS. Thanks.
Will be available in 0.18.0a5.

Related Changesets

MantisBT: master 008c1268

2003-07-13 06:27

vboctor


Details Diff
Fix 0003175: login fails when saved password is PLAIN and login_method is not PLAIN.

M core/authentication_api.php
- Fixed to make the check $p_method use !== rather than !=. This will differentiate between PLAIN (=0) and null.

Thanks to Lincoln Maskey / Narcissus for the fix.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2184 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0003175
mod - core/authentication_api.php Diff File
mod - doc/ChangeLog Diff File