mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
use stringstream
This commit is contained in:
parent
fba2392bb7
commit
53ca30be25
0
buildscripts/errorcodes.py
Normal file → Executable file
0
buildscripts/errorcodes.py
Normal file → Executable file
@ -307,20 +307,21 @@ namespace mongo {
|
||||
string ha1 = user["pwd"].str();
|
||||
string ha2 = md5simpledigest( (string)"GET" + ":" + parms["uri"] );
|
||||
|
||||
string r = ha1 + ":" + parms["nonce"];
|
||||
stringstream r;
|
||||
r << ha1 << ':' << parms["nonce"];
|
||||
if ( parms["nc"].size() && parms["cnonce"].size() && parms["qop"].size() ){
|
||||
r += ":";
|
||||
r += parms["nc"];
|
||||
r += ":";
|
||||
r += parms["cnonce"];
|
||||
r += ":";
|
||||
r += parms["qop"];
|
||||
r << ':';
|
||||
r << parms["nc"];
|
||||
r << ':';
|
||||
r << parms["cnonce"];
|
||||
r << ':';
|
||||
r << parms["qop"];
|
||||
}
|
||||
r += ":";
|
||||
r += ha2;
|
||||
r = md5simpledigest( r );
|
||||
r << ':';
|
||||
r << ha2;
|
||||
string r1 = md5simpledigest( r.str() );
|
||||
|
||||
if ( r == parms["response"] )
|
||||
if ( r1 == parms["response"] )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user